/* ═══════════════════════════════════════
   WoGL — World of GL
   wogl.io | worldofgl.com | mundogl.com
   hello@wogl.io | hola@mundogl.com

   Proprietary. All rights reserved.
   ═══════════════════════════════════════ */
/* Portals on Academy: the giant word, its line and the three steps over wogl.io's own game card. The card's rules are
   wogl.io's (noche.css), copied as they are, so the game looks the same in both houses. */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --line: rgba(244, 236, 225, .1); }
.pp { padding: calc(var(--nav-h, 72px) + clamp(28px, 5vw, 64px)) clamp(16px, 4vw, 56px) clamp(56px, 8vw, 110px); }
.pp-cab { display: grid; gap: 22px 48px; align-items: end; margin-bottom: clamp(26px, 4vw, 44px); }
@media (min-width: 900px) { .pp-cab { grid-template-columns: minmax(0, 1fr) auto; } }
.pp-titulo { margin: 0; font: 300 clamp(64px, 13vw, 200px)/.86 var(--sans); letter-spacing: -.045em; color: var(--cream); }
.pp-lede { max-width: 34em; margin: 18px 0 0; font: 300 clamp(17px, 1.5vw, 20px)/1.5 var(--sans); color: rgba(244, 236, 225, .72); }
.pp-cab .instr { margin: 0; }
.pp-cab .pasos { margin: 0; }
/* Academy paints every canvas black (home.css); the game's are see-through, as on wogl.io */
.p-juego canvas { background: none; }
.tarjeta { border-radius: 16px; box-shadow: 0 40px 80px -34px #000, inset 0 0 0 1px var(--line); }
.instr-t { display: block; margin-bottom: 12px; font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.instr .pasos { margin: 0; }
.pasos { list-style: none; display: grid; gap: 8px; margin: 26px 0 28px; padding: 0; }
.pasos li { display: flex; align-items: center; gap: 14px; font: 400 16px/1 var(--sans); }
.pasos b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(232, 200, 154, .45); font: 500 12px/1 var(--mono); color: var(--gold); }
/* Portals in its card (juego-portal.js): the still portal, then wogl.io's game in place */
.p-juego { position: relative; overflow: hidden; isolation: isolate; container-type: inline-size; aspect-ratio: 21 / 9; background: #05040a; }
.p-juego .portals-canvas, .pj-quieto { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pj-quieto { z-index: 1; object-fit: cover; transition: opacity .5s var(--ease-out); }
.p-juego::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(70% 70% at 50% 50%, rgba(2, 3, 10, .4), rgba(2, 3, 10, .06)); }
.pj-ui { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; }
.pj-ui > :not(.pfz-portales), .pj-ui .pfz-flecha { transition: opacity .7s var(--ease-out) .2s; }
.p-juego:not(.prendido) .pj-ui > :not(.pfz-portales), .p-juego:not(.prendido) .pj-ui .pfz-flecha { opacity: 0; }
.p-juego.montado .pj-quieto { opacity: 0; }
.pj-prende { position: absolute; z-index: 4; left: 50%; bottom: clamp(16px, 5cqw, 28px); translate: -50% 0; transition: opacity .35s, translate .5s var(--ease-out); }
.p-juego.prendido .pj-prende { opacity: 0; translate: -50% 10px; pointer-events: none; }
.p-juego .pfz-nombre { height: 14px; margin: 0; font: 500 12px/1 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.p-juego .pfz-nombre.cambia { animation: pfz-nombre .5s var(--ease) both; }
@keyframes pfz-nombre { from { opacity: 0; transform: translateY(4px); filter: blur(3px); } }
.p-juego .pfz-portales { display: flex; align-items: center; gap: 2px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.p-juego .pfz-flecha { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: rgba(244, 236, 225, .88); transition: color .25s, background-color .25s; }
.p-juego .pfz-flecha:hover { color: var(--gold); background: rgba(244, 236, 225, .06); }
.p-juego .pfz-flecha svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.p-juego .pfz-portal { position: relative; flex: none; width: min(320px, 56cqw); aspect-ratio: 32 / 15; cursor: grab; touch-action: pan-y; }
.p-juego .pfz-portal canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.p-juego .pfz-vecino { position: absolute; width: 48px; height: 56px; padding: 0; border-radius: 12px; }
.p-juego .pfz-vecino:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.p-juego .pfz-palabras { width: 100%; margin: 4px 0 0; display: grid; place-items: center; font: 300 clamp(26px, 5cqw, 46px)/1.15 var(--sans); color: var(--cream); white-space: nowrap; }
.p-juego .pfz-t { display: inline-block; white-space: nowrap; font-family: var(--mono); font-size: .72em; letter-spacing: -.01em; }
.p-juego .pfz-t::before { content: '> '; color: var(--gold); }
.p-juego .pfz-t::after { content: ''; display: inline-block; width: .55em; height: 1em; margin-left: .1em; vertical-align: -.15em; background: var(--gold); animation: pfz-caret 1s steps(2) infinite; }
.p-juego .pfz-t .pw { color: rgb(var(--c)); }
.p-juego .pfz-t.prende .pl { animation: pfz-tecla .01s both; animation-delay: calc(var(--n) * 45ms); }
@keyframes pfz-tecla { from { opacity: 0; } }
@keyframes pfz-caret { 50% { opacity: 0; } }
.p-juego .pfz-dice { min-height: 1.5em; margin: 0; font: 300 12px/1.5 var(--mono); color: rgba(244, 236, 225, .58); text-wrap: balance; }
.p-juego .pfz-dice:not(:empty)::before { content: '// '; color: rgba(232, 200, 154, .7); }
.p-juego .pfz-dice.cambia { animation: pfz-nombre .5s var(--ease) .35s both; }
.p-juego .portals-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.p-juego .portals-cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.p-juego .portals-cta .btn { transition: background-color .6s ease, color .6s ease; }
.p-juego [data-portals="teleport"], .p-juego [data-portals="teleport"]:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 60%), rgb(var(--pj, 215 173 120) / .55); color: var(--pj-ink, #fff6e8); }
.p-juego [data-portals="remix"], .p-juego [data-portals="remix"]:hover { background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0) 60%), rgb(var(--pr, 255 250 242) / .26); color: var(--pr-ink, var(--cream)); box-shadow: none; }
.p-juego [data-portals="teleport"] { animation: salto 3s cubic-bezier(.3, .7, .4, 1) 1.2s infinite; transform-origin: 50% 100%; }
@keyframes salto { 0%, 72%, 100% { translate: 0 0; scale: 1 1; } 76% { translate: 0 1px; scale: 1.05 .93; } 83% { translate: 0 -10px; scale: .97 1.04; } 90% { translate: 0 0; scale: 1.04 .95; } 95% { translate: 0 -2px; scale: 1 1; } }
@media (max-width: 999px) { .p-juego { aspect-ratio: 16 / 10; } }
@media (max-width: 699px) { .p-juego, .portal .p-juego { aspect-ratio: 1; } }
@media (prefers-reduced-motion: reduce) { .p-juego [data-portals="teleport"], .p-juego .pfz-t .pl, .p-juego .pfz-t::after { animation: none !important; } }
