/* Página de inicio: hero, escenas con scroll fijo, demostración, ducto 3D, beta, valores */
.lava-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s var(--ease); }
.lava-canvas.lista { opacity: 1; }
/* Esfera: lienzo DENTRO del hero (absoluto): sube y sale con él al hacer scroll; nada queda flotando en otras secciones */
@property --fade { syntax: '<length>'; inherits: false; initial-value: 200px; }
.esfera-canvas { --fade: 200px; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .35s var(--ease), --fade .9s var(--ease);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade)), transparent); }
.esfera-canvas.en-juego { --fade: 0px; }
.esfera-canvas.lista { opacity: 1; }
body.home main, body.home .pie { position: relative; z-index: 1; }
body.home .cab { position: sticky; }

/* ---- Hero ---- */
.hero { position: relative; min-height: calc(100svh - var(--cab-h)); display: grid; align-items: center; overflow: clip; }
.hero__fondo { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(60% 55% at 72% 55%, rgba(255, 106, 26, .22), transparent 70%),
  radial-gradient(40% 40% at 78% 62%, rgba(255, 178, 122, .16), transparent 70%); }
.hero__brasa { position: absolute; right: 7%; top: 22%; width: min(32vw, 440px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #ffd2a8, #ff8a47 28%, #ff6a1a 52%, #7a2200 78%, #1a0a05 100%); filter: blur(1px); opacity: 0; box-shadow: 0 0 140px 20px rgba(255, 106, 26, .35); transition: opacity .8s; }
/* Respaldo estático: NO se ve mientras la esfera 3D está por nacer; solo aparece (con fundido) sin JS, sin WebGL o con movimiento reducido */
html:not(.js) .hero__brasa, html.sin-3d .hero__brasa { opacity: .85; }
html.lava-lista .hero__brasa { opacity: 0; transition-duration: .3s; }
.hero__fondo::after { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease); background: radial-gradient(38% 46% at 50% 50%, rgba(255, 106, 26, .2), transparent 72%); }
html.modo-juego .hero__fondo::after { opacity: 1; }
.hero__in { position: relative; z-index: 1; padding-block: clamp(48px, 9vw, 120px); transition: opacity .6s var(--ease), filter .6s var(--ease), transform .8s var(--ease), visibility 0s; }
html.modo-juego .hero__in { opacity: 0; filter: blur(14px); transform: translateX(-32px); visibility: hidden; pointer-events: none; transition: opacity .5s var(--ease), filter .55s var(--ease), transform .8s var(--ease), visibility 0s .6s; }
.hero__bajar { transition: opacity .4s; }
html.modo-juego .hero__bajar { opacity: 0; pointer-events: none; }
/* Botón ANCLADO: se centra con la propiedad `translate` (no con `transform`), así ni :hover ni :active (que usan transform en .btn)
   ni el pulso (solo box-shadow) pueden mover su caja de clic entre pulsar y soltar. */
.btn--jugar { position: absolute; z-index: 6; left: 77%; top: calc(22% + min(32vw, 440px) + 8px); translate: -50% 0; transform: none; gap: .55rem; white-space: nowrap;
  box-shadow: 0 10px 34px -10px rgba(255, 106, 26, .7); animation: jugar-pulso 2.6s ease-in-out infinite; transition: opacity .4s var(--ease), visibility 0s; }
html .btn--jugar:hover, html .btn--jugar:active, html .btn--jugar:focus { transform: none; translate: -50% 0; }
@keyframes jugar-pulso { 0%, 100% { box-shadow: 0 8px 26px -12px rgba(255, 106, 26, .55), 0 0 0 0 rgba(255, 106, 26, .35); } 50% { box-shadow: 0 10px 34px -8px rgba(255, 106, 26, .85), 0 0 0 9px rgba(255, 106, 26, 0); } }
html.modo-juego .btn--jugar { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s var(--ease), visibility 0s .4s; }
@media (max-width: 760px) { .btn--jugar { left: 50%; top: 150px; } }
.btn--jugar::before { content: ""; width: 0; height: 0; border-left: 10px solid #0d0e11; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.btn--jugar[hidden] { display: none; }
.hero__titulo { font-size: clamp(2.6rem, 8.4vw, 6.4rem); line-height: .98; letter-spacing: -.035em; margin-bottom: .35em; }
.hero__titulo .linea { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__titulo .linea > span { display: inline-block; }
.hero__titulo .linea:last-child > span { background: linear-gradient(95deg, var(--lava-b), var(--lava) 55%, #ff4d00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.js .hero__titulo .linea > span { transform: translateY(105%); animation: linea-sube .9s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes linea-sube { to { transform: none; } }
.hero__sub { max-width: 54ch; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--tx); }
.hero__acciones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero__chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.8rem; }
.hero__chips li { padding: .25rem .75rem; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; color: var(--tx2); background: rgba(22, 24, 29, .6); }
.hero__pista { margin-top: 2rem; font-size: .8rem; color: var(--tx2); font-family: var(--f-mono); }
.hero__bajar { position: absolute; left: 50%; bottom: 20px; width: 28px; height: 44px; margin-left: -14px; border: 1.5px solid var(--tx2); border-radius: 14px; opacity: .7; }
.hero__bajar span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--lava); animation: bajar 1.8s infinite; }
@keyframes bajar { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 760px) { .hero__in { padding-top: 300px; } .hero__bajar { display: none; } .hero__brasa { right: -10%; top: 10%; width: 90vw; } .hero__pista { display: none; } }

/* ---- Flujo: pasos que cambian solos (el scroll de la página queda libre) ---- */
.flujo { position: relative; }
.flujo__in { padding-block: clamp(48px, 7vw, 88px); }
.flujo .sec__cab { margin-bottom: 1.6rem; }
.flujo__cuerpo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.flujo__pasos { list-style: none; display: grid; }
.js .flujo__pasos { display: block; position: relative; min-height: 230px; }
.paso { padding: 1rem 0 1.4rem; border-top: 1px solid var(--line); }
.paso__k { color: var(--lava); font-family: var(--f-mono); font-size: .85rem; margin: 0 0 .3rem; }
.paso h3 { font-size: 1.6rem; }
.paso p:not(.paso__k) { color: var(--tx2); }
.js .paso { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(24px); pointer-events: none; transition: opacity .45s var(--ease), transform .45s var(--ease); }
.js .paso.activo { opacity: 1; transform: none; pointer-events: auto; }
.flujo__vista { position: relative; }
.flujo__vista .ventana__cuerpo { aspect-ratio: 16 / 10; }
.vista { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: scale(1.04); transition: opacity .6s var(--ease), transform .8s var(--ease); }
.vista.activa { opacity: 1; transform: none; }
html:not(.js) .vista { position: static; opacity: 1; transform: none; }
.vista--formatos { display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, rgba(255, 106, 26, .18), transparent 60%), var(--bg); }
.vista--formatos ul { list-style: none; display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; padding: 1rem; }
.vista--formatos code { display: block; padding: .8rem 1.2rem; border: 1px solid rgba(255, 106, 26, .4); border-radius: var(--r); background: var(--s1); font-size: clamp(1rem, 2vw, 1.5rem); }
.flujo__prog { height: 3px; margin-top: 14px; background: var(--line); border-radius: 2px; overflow: hidden; }
.flujo__prog span { display: block; height: 100%; width: 100%; background: var(--lava); transform-origin: left; transform: scaleX(0); }
.flujo__prog span.corre { transform: scaleX(1); transition: transform var(--paso-ms, 5000ms) linear; }
@media (max-width: 860px) {
  .flujo__cuerpo { grid-template-columns: 1fr; }
  .js .flujo__pasos { min-height: 200px; }
  .js .flujo__in .sec__intro { display: none; }
  .js .flujo__in .sec__cab { margin-bottom: .6rem; }
}

/* ---- Demostración ---- */
.demo__tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.demo__tab { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--s1); cursor: pointer; transition: all var(--t-corto); }
.demo__tab svg { width: 18px; height: 18px; color: var(--lava); }
.demo__tab:hover { border-color: var(--tx2); }
.demo__tab[aria-selected="true"] { border-color: var(--lava); background: var(--lava-fondo); color: var(--blanco); }
.demo__marco { position: relative; }
.demo__panel { margin: 0; }
.demo__panel[hidden] { display: none; }
.demo__panel figcaption { margin-top: .8rem; color: var(--tx2); font-size: .92rem; }
.demo__trazo { position: absolute; left: 22%; top: 20%; width: 34%; height: 46%; pointer-events: none; overflow: visible; }
.demo__curva { fill: none; stroke: var(--lava); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 4px rgba(255, 106, 26, .7)); vector-effect: non-scaling-stroke; }
.demo__nodos rect { fill: #fff; stroke: #0d0e11; stroke-width: 1.5; opacity: 0; vector-effect: non-scaling-stroke; }
.demo__cursor { fill: #fff; stroke: #0d0e11; stroke-width: 1; opacity: 0; transform: translate(20px, 160px); }
.demo.visto .demo__curva { animation: trazo-curva 2.6s .5s var(--ease) forwards; }
.demo.visto .demo__nodos rect { animation: aparece .3s forwards; }
.demo.visto .demo__nodos rect:nth-child(1) { animation-delay: .5s; }
.demo.visto .demo__nodos rect:nth-child(2) { animation-delay: 1.7s; }
.demo.visto .demo__nodos rect:nth-child(3) { animation-delay: 2.9s; }
.demo.visto .demo__cursor { animation: cursor-recorre 2.6s .5s var(--ease) forwards; }
@keyframes trazo-curva { to { stroke-dashoffset: 0; } }
@keyframes aparece { to { opacity: 1; } }
@keyframes cursor-recorre { 0% { opacity: 1; transform: translate(20px, 160px); } 50% { opacity: 1; transform: translate(240px, 70px); } 100% { opacity: 1; transform: translate(380px, 120px); } }
.js .demo__marco .ventana { opacity: 0; transform: perspective(1400px) rotateX(10deg) translateY(50px); transform-origin: top center; transition: opacity .9s var(--ease), transform 1s var(--ease); }
.js .demo.visto .demo__marco .ventana { opacity: 1; transform: none; }
.demo__pend { margin: 0; }

/* ---- Estado en vivo ---- */
.cinta { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--s1); -webkit-mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.cinta__lista { list-style: none; display: flex; width: max-content; gap: 2.4rem; padding: 1rem 1.4rem; white-space: nowrap; }
.cinta.corre .cinta__lista { animation: cinta var(--dur, 60s) linear infinite; }
.cinta:hover .cinta__lista { animation-play-state: paused; }
.cinta__lista li { font-size: .92rem; }
.cinta__lista b { color: var(--lava-b); margin-right: .4rem; }
@keyframes cinta { to { transform: translateX(-50%); } }

/* ---- Ducto 3D ---- */
.ducto { position: relative; }
.ducto__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 4vw, 56px); align-items: center; padding-block: clamp(48px, 7vw, 88px); }
.ducto__stage { position: relative; aspect-ratio: 4 / 3; min-height: 280px; border: 1px solid var(--line); border-radius: var(--r-l); background:
  linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px;
  background-color: transparent; box-shadow: inset 0 0 80px rgba(0, 0, 0, .5); overflow: hidden; }
.ducto__stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(13, 14, 17, .75) 100%); }
.ducto__fallback { position: absolute; inset: 6%; width: 88%; height: 88%; color: var(--lava-b); opacity: 0; }
html.sin-3d .ducto__fallback { opacity: 1; }
html.sin-3d .ducto__stage { background-color: var(--s1); }
.d-solido { fill: rgba(255, 106, 26, .1); }
.ducto__cap { position: absolute; left: 14px; bottom: 12px; z-index: 2; margin: 0; padding: .2rem .6rem; border: 1px solid var(--line); border-radius: var(--r-s); background: rgba(13, 14, 17, .85); font-family: var(--f-mono); font-size: .78rem; color: var(--tx); }
.hibrido { list-style: none; display: grid; gap: .7rem; margin: 1.4rem 0; }
.hibrido li { display: grid; gap: .1rem; padding: .7rem 1rem; border-left: 3px solid var(--line); background: rgba(22, 24, 29, .7); border-radius: 0 var(--r-s) var(--r-s) 0; }
.hibrido b { color: var(--blanco); }
.hibrido span { color: var(--tx2); font-size: .92rem; }
.hibrido--ambos { border-left-color: var(--lava) !important; }
.ducto__modo { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--s1); margin-bottom: 1rem; }
.seg { min-height: 40px; padding: .3rem 1rem; border: 0; border-radius: 999px; background: transparent; color: var(--tx2); cursor: pointer; font-weight: 700; }
.seg[aria-pressed="true"] { background: var(--lava); color: #0d0e11; }
.ducto__prods { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
.ducto__prods a { display: inline-flex; align-items: center; gap: .4rem; color: var(--tx); text-decoration: none; }
.ducto__prods a:hover { color: var(--lava-b); }
.ducto__prods svg { width: 18px; height: 18px; color: var(--lava); }
@media (max-width: 860px) {
  .ducto__in { grid-template-columns: 1fr; padding-block: 12px; }
  .ducto__stage { order: -1; aspect-ratio: 16 / 9; min-height: 0; }
  .js .ducto__in .sec__intro, .js .hibrido { display: none; }
  .js .ducto__prods { display: none; }
}

/* ---- Beta y valores ---- */
.sec--beta { background: linear-gradient(180deg, transparent, rgba(255, 106, 26, .06) 40%, transparent); }
.beta-cta { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.beta-cta__nota { color: var(--lava-b); font-size: .95rem; border-left: 3px solid var(--lava); padding-left: .9rem; max-width: 52ch; }
@media (max-width: 860px) { .beta-cta { grid-template-columns: 1fr; } }
.frase-gigante { font-size: clamp(2rem, 5.6vw, 4.4rem); line-height: 1.08; max-width: 18ch; letter-spacing: -.035em; }
.frase-gigante .pal { display: inline-block; opacity: .16; transition: opacity .4s, color .4s; margin-right: .22em; }
.frase-gigante .pal.on { opacity: 1; }
.frase-gigante .pal.on:nth-child(3n) { color: var(--lava-b); }

@media (prefers-reduced-motion: reduce) {
  .lava-canvas, .esfera-canvas { display: none; }
  .js .flujo { height: auto; }
  .js .flujo__stick, .js .ducto__stick { position: static; height: auto; }
  .js .ducto { height: auto; }
  .js .flujo__pasos { min-height: 0; }
  .js .paso { position: static; opacity: 1; transform: none; pointer-events: auto; }
  .vista { position: static; opacity: 1; transform: none; }
  .vista:not([data-vista="0"]) { display: none; }
  .js .hero__titulo .linea > span { transform: none; animation: none; }
  .ducto__fallback { opacity: 1; }
  .cinta__lista { flex-wrap: wrap; width: auto; white-space: normal; }
  .cinta.corre .cinta__lista { animation: none; }
  .frase-gigante .pal { opacity: 1; }
  .demo__curva { stroke-dashoffset: 0; }
  .demo__nodos rect { opacity: 1; }
  .demo__cursor { opacity: 0; }
  .js .demo__marco .ventana { opacity: 1; transform: none; }
  .js .flujo__in .sec__intro { display: block; }
  .js .ducto__in .sec__intro, .js .hibrido, .js .ducto__prods { display: grid; }
  .hero__bajar span { animation: none; }
}

/* ---- Esfera interactiva: zona de captura (anclada sobre la esfera) y minijuego «Forja el núcleo» ---- */
.esfera-zona { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 5; border-radius: 50%; pointer-events: none; touch-action: pan-y; cursor: grab; -webkit-tap-highlight-color: transparent; user-select: none; }
.esfera-zona.on { pointer-events: auto; }
.esfera-zona.arrastrando { cursor: grabbing; }
.esfera-zona.jugando { cursor: crosshair; touch-action: none; }
.esfera-zona:focus-visible { outline: 2px solid var(--lava-b); outline-offset: 4px; border-radius: 50%; }
/* ---- Modo juego: HUD mínimo (puntuación y nivel arriba, calor abajo) y tarjeta de resultado ---- */
.forja { position: fixed; inset: var(--cab-h) 0 0 0; z-index: 30; pointer-events: none; transition: opacity .3s var(--ease); }
.forja[hidden], .hud[hidden], .fin[hidden] { display: none; }
.forja--lejos { opacity: 0; }
.hud { position: absolute; inset: 0; animation: hud-entra .7s var(--ease) .35s both; }
@keyframes hud-entra { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.hud__arriba { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: .15rem; text-align: center; text-shadow: 0 2px 18px rgba(0, 0, 0, .85); width: max-content; max-width: calc(100vw - 150px); }
.hud__marcador { display: flex; align-items: baseline; gap: .5rem; }
.hud__puntos { font: 800 clamp(2.2rem, 6vw, 3.4rem) var(--f-mono); color: #fff; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hud__u { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--tx2); }
.hud__meta { display: flex; gap: 1.1rem; font: 700 .9rem var(--f-mono); color: var(--lava-b); }
.hud__meta b { color: #fff; }
.hud__nivel { display: inline-block; }
.hud__frase { margin: .25rem 0 0; font-size: .8rem; color: var(--lava-b); max-width: 44ch; min-height: 1.1em; }
.hud__frase:empty { display: none; }
.hud__botones { position: absolute; top: 12px; right: 14px; display: flex; gap: .45rem; pointer-events: auto; }
.hud__btn { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: rgba(16, 17, 21, .62); color: var(--tx); cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: border-color .2s, background .2s, color .2s; }
.hud__btn:hover, .hud__btn--on { border-color: var(--lava); color: #fff; }
.hud__btn:focus-visible { outline: 2px solid var(--lava-b); outline-offset: 2px; }
.hud__pausa { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(16, 17, 21, .78); color: var(--lava-b); font: 700 .85rem var(--f-mono); text-align: center; }
.forja--pausa .hud__pausa { display: block; }
.hud__abajo { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(560px, 86vw); display: flex; align-items: center; gap: .8rem; }
.hud__calor-t { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--tx2); text-shadow: 0 1px 8px #000; }
.forja__barra { flex: 1; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .09); border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 0 calc(var(--calor, 0) * 26px) rgba(255, 106, 26, calc(var(--calor, 0) * .75)); }
.forja__barra span { display: block; width: 100%; height: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #ff6a1a, #ffb27a 60%, #fff3d6); transition: transform .15s linear; }
.hud-pop { animation: hud-pop .38s var(--ease); }
html.modo-juego .hero { touch-action: none; }
/* onda de calor al romperse un meteorito: anillo que se expande desde el punto exacto de rotura */
.onda-calor { position: absolute; z-index: 6; left: 0; top: 0; width: calc(var(--r, 60px) * 2); height: calc(var(--r, 60px) * 2); margin: calc(var(--r, 60px) * -1) 0 0 calc(var(--r, 60px) * -1); border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(255, 150, 60, .75); box-shadow: 0 0 22px 2px rgba(255, 90, 20, .35), inset 0 0 18px rgba(255, 120, 40, .25); animation: onda-calor .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes onda-calor { 0% { opacity: .95; transform: scale(.25); } 100% { opacity: 0; transform: scale(1.7); } }
.aviso-bola { position: absolute; z-index: 6; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 150, 40, .85), rgba(255, 70, 10, .35) 40%, transparent 70%); animation: aviso-borde .85s var(--ease) both; }
@keyframes aviso-borde { 0% { opacity: 0; transform: scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes hud-pop { 40% { transform: scale(1.16); filter: brightness(1.35); } }
.fin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(470px, calc(100vw - 24px)); max-height: calc(100svh - var(--cab-h) - 20px); overflow: auto;
  padding: 1.1rem 1.2rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r-l); background: rgba(16, 17, 21, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .95), 0 0 70px -20px rgba(255, 106, 26, .45); pointer-events: auto; animation: fin-entra .6s var(--ease) both; }
@keyframes fin-entra { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%); } }
.fin__t { margin: 0 0 .2rem; font-size: 1.35rem; color: var(--lava-b); }
.fin__res { margin: 0; font: 700 1.05rem var(--f-mono); color: var(--blanco); }
.fin__gancho { margin: .5rem 0 .2rem; color: var(--tx); font-size: .93rem; }
.fin__form { margin: .7rem 0 0; display: grid; gap: .45rem; }
.fin__form label { font-size: .86rem; color: var(--tx2); }
.fin__campo { display: flex; gap: .5rem; }
.fin__campo input { flex: 1; min-width: 0; min-height: 40px; padding: .4rem .7rem; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--bg); color: var(--blanco); font: inherit; }
.fin__campo input:focus-visible { outline: 2px solid var(--lava-b); outline-offset: 1px; border-color: var(--lava); }
.fin__priv { margin: 0; font-size: .74rem; color: var(--tx2); }
.fin__msg { margin: 0; min-height: 1.2em; font-size: .88rem; color: var(--lava-b); }
.fin__msg[data-tipo="error"] { color: #ff8a80; }
.fin__acc { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.fin__mas { margin: .9rem 0 0; padding-top: .7rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--tx2); }
.fin__mas a { color: var(--lava-b); }

/* ---- Lista «Mejores jugadores» (bajo el hero) ---- */
.sec--records { padding-block: clamp(40px, 6vw, 80px); }
.records { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.records__gancho { margin: .2rem 0 1rem; font-weight: 700; color: var(--lava-b); font-size: 1.05rem; }
.records__como { margin: 0 0 1rem; font-size: .88rem; color: var(--tx2); }
.records__como summary { cursor: pointer; }
.records__invita { margin: 1rem 0 .8rem; color: var(--tx); }
.records__caja { border: 1px solid var(--line); border-radius: var(--r-l); background: rgba(22, 24, 29, .75); padding: .6rem 1.1rem 1rem; }
.records__lista { list-style: none; margin: 0; padding: 0; }
.records__fila { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto 5.2rem; gap: .7rem; align-items: baseline; padding: .6rem 0; border-top: 1px solid var(--line); }
.records__fila:first-child { border-top: 0; }
.records__pos { font: 700 .9rem var(--f-mono); color: var(--tx2); }
.records__fila--top .records__pos, .records__fila--top .records__pts { color: var(--lava-b); }
.records__nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--blanco); font-weight: 700; }
.records__niv { font-size: .78rem; color: var(--tx2); font-family: var(--f-mono); }
.records__pts { text-align: right; font: 700 1.05rem var(--f-mono); color: var(--blanco); font-variant-numeric: tabular-nums; }
.records__vacio { padding: 1rem 0; color: var(--tx2); }
.records__aviso { margin: .6rem 0 0; font-size: .8rem; color: var(--lava-b); }
.records__nota { margin: .7rem 0 0; font-size: .74rem; color: var(--tx2); }
@media (max-width: 860px) { .records { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .hud__arriba { top: 8px; } .hud__btn { width: 40px; height: 40px; } .hud__abajo { bottom: 16px; } }
.forja-flota { position: absolute; z-index: 6; transform: translate(-50%, -50%); pointer-events: none; font: 700 1.05rem var(--f-mono); color: #ffe2b8; text-shadow: 0 0 10px rgba(255, 106, 26, .9); animation: forja-sube .95s var(--ease) forwards; }
.forja-flota--nivel { font-size: 1.5rem; color: #fff; letter-spacing: .04em; }
@keyframes forja-sube { from { opacity: 0; transform: translate(-50%, -30%); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -150%); } }
@media (prefers-reduced-motion: reduce) {
  .hero__in, html.modo-juego .hero__in { transition: none; filter: none; }
  .hud, .fin { animation: none; }
  .hud-pop, .btn--jugar, .aviso-bola { animation: none; }
  .onda-calor { display: none; }
  .hero__fondo::after { transition: none; }
}
