/* Gol Cometa — marcador, mandos y pantallas. Claro, colorido y muy legible; botones sólidos (sin degradados). */
@font-face { font-family: 'Lilita One'; src: url('/games/_vendor/fonts/lilita-one-latin.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'Lilita One'; src: url('/games/_vendor/fonts/lilita-one-latin-ext.woff2') format('woff2'); unicode-range: U+0100-024F; font-display: block; }
@font-face { font-family: 'Inter'; src: url('/games/_vendor/fonts/inter-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #16204a; --blue: #2f7cff; --orange: #ff8a1c; --yellow: #ffd23f; --pink: #ff4f92; --green: #1fb85a; --violet: #7a2cf5;
  --red: #f52238; --card: #fffdf7; --soft: #eef3ff; --mute: #6b7399;
  --st: max(8px, env(safe-area-inset-top)); --sb: max(12px, env(safe-area-inset-bottom));
  --sl: max(10px, env(safe-area-inset-left)); --sr: max(10px, env(safe-area-inset-right));
  --u: clamp(62px, 18.5vmin, 88px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #5fb3ff; touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: none; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--ink); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; padding: 0; background: none; touch-action: manipulation; }
[hidden] { display: none !important; }
#stage { position: fixed; inset: 0; }
#stage canvas { display: block; width: 100%; height: 100%; }
svg { display: block; }

/* ---------------------------------------------------------------- Marcador */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0; transition: opacity .3s; }
.hud.on { opacity: 1; }
.hud .top { position: absolute; top: var(--st); left: var(--sl); right: var(--sr); display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.rb { pointer-events: auto; width: 42px; height: 42px; border-radius: 14px; background: var(--card); color: var(--ink); display: grid; place-items: center; box-shadow: 0 4px 0 rgba(22, 32, 74, .22), 0 8px 18px rgba(12, 30, 80, .22); flex: none; transition: transform .12s; }
.rb svg { width: 22px; height: 22px; }
.rb:active { transform: translateY(2px); }
.hud:not(.on) .rb, .hud:not(.on) .ab, .hud:not(.on) .zone { pointer-events: none; }
.board { display: grid; grid-template-columns: 1fr auto 1fr; border-radius: 16px; overflow: hidden; background: var(--ink); color: #fff; box-shadow: 0 8px 22px rgba(10, 22, 66, .38); min-width: min(330px, 66vw); }
.board .side { display: flex; align-items: center; gap: 8px; padding: 5px 10px; position: relative; }
.board .side::before { content: ''; position: absolute; top: 0; bottom: 0; width: 6px; background: var(--c); }
.board .side.a { justify-content: flex-start; padding-left: 14px; } .board .side.a::before { left: 0; } .board .side.a .sc { margin-left: auto; }
.board .side.b { justify-content: flex-end; padding-right: 14px; } .board .side.b::before { right: 0; } .board .side.b .sc { margin-right: auto; }
.board .cr { width: 27px; height: 27px; flex: none; } .board .cr svg { width: 100%; height: 100%; }
.board .tag { font: 400 17px/1 'Lilita One', sans-serif; letter-spacing: .04em; }
.board .sc { font: 400 32px/1 'Lilita One', sans-serif; min-width: 22px; text-align: center; }
.board .sc.bump { animation: scBump .9s cubic-bezier(.2, 1.6, .4, 1); }
.board .mid { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 12px; background: var(--card); color: var(--ink); min-width: 74px; }
.board .clock { font: 400 24px/1.05 'Lilita One', sans-serif; font-variant-numeric: tabular-nums; }
.board .half { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #b06a00; white-space: nowrap; }
.hud.hot .board .mid { background: var(--red); color: #fff; animation: beat .5s ease-in-out infinite alternate; }
.hud.ot .board .mid { background: var(--yellow); }
.board .en { grid-row: 2; height: 15px; display: flex; align-items: center; gap: 5px; padding: 0 7px 3px; position: relative; }
.board .en.a { grid-column: 1; padding-left: 12px; } .board .en.b { grid-column: 3; justify-content: flex-end; padding-right: 12px; }
.board .en i { flex: 1; height: 7px; border-radius: 5px; background: rgba(255, 255, 255, .17); position: relative; overflow: hidden; }
.board .en i::before { content: ''; position: absolute; inset: 0; border-radius: 5px; background: var(--yellow); transform: scaleX(var(--e, 0)); transform-origin: 0 50%; transition: transform .25s; }
.board .en.b i::before { transform-origin: 100% 50%; }
.board .en em { width: 13px; height: 13px; color: rgba(255, 255, 255, .45); } .board .en em svg { width: 100%; height: 100%; }
.board .en.full i::before { background: #ff6a2a; animation: hotbar .35s linear infinite alternate; }
.board .en.full em { color: var(--yellow); animation: spinny .7s ease-in-out infinite alternate; }
@keyframes hotbar { to { background: #ffe14d; } }
@keyframes spinny { to { transform: scale(1.5) rotate(16deg); } }
@keyframes scBump { 0% { transform: scale(1); } 25% { transform: scale(1.9); color: var(--yellow); } 100% { transform: scale(1); } }
@keyframes beat { to { transform: scale(1.06); } }
.net { position: absolute; top: calc(var(--st) + 50px); left: var(--sl); font-size: 11px; font-weight: 800; color: #fff; background: rgba(16, 28, 76, .7); border-radius: 9px; padding: 3px 8px; }
.net.slow { background: #c56a00; } .net.bad { background: var(--red); animation: beat .5s infinite alternate; }

/* Mensajes */
.pops { position: absolute; left: 0; right: 0; top: 20%; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pop { font: 400 clamp(26px, 6.2vmin, 52px)/1 'Lilita One', sans-serif; color: #fff; text-align: center; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; filter: drop-shadow(0 4px 0 rgba(22, 32, 74, .35)); animation: popIn 1.15s cubic-bezier(.2, 1.4, .4, 1) forwards; white-space: nowrap; }
.pop.gold { color: var(--yellow); } .pop.cyan { color: #5fe8ff; } .pop.pink { color: #ff8fc0; } .pop.mint { color: #7dffb0; } .pop.red { color: #ff8a7a; } .pop.orange { color: #ffb04a; }
.pop.small { font-size: clamp(19px, 4.2vmin, 32px); -webkit-text-stroke-width: 5px; }
@keyframes popIn { 0% { transform: scale(.3) translateY(22px); opacity: 0; } 15% { transform: scale(1.16); opacity: 1; } 26% { transform: scale(1); } 80% { opacity: 1; transform: translateY(-8px); } 100% { opacity: 0; transform: translateY(-30px) scale(.96); } }
.toasts { position: absolute; left: 50%; top: calc(var(--st) + 80px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.toast { display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: 14px; padding: 7px 13px; font-size: 13px; font-weight: 800; box-shadow: 0 6px 16px rgba(12, 30, 80, .25); animation: rise .35s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .4s, transform .4s; white-space: nowrap; }
.toast i { width: 11px; height: 11px; border-radius: 50%; flex: none; } .toast.out { opacity: 0; transform: translateY(12px); }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }

/* Destellos, viñeta, líneas de velocidad */
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
.flash.go { animation: flash .4s ease-out; } .flash.go.gold { background: #ffe27a; } .flash.go.comet { background: #ffa340; }
@keyframes flash { from { opacity: .5; } to { opacity: 0; } }
.vignette { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; box-shadow: inset 0 0 110px 14px rgba(245, 34, 56, .55); }
.hud.hot .vignette { opacity: 1; }
.speed { position: absolute; inset: -12%; opacity: 0; transition: opacity .2s; background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0) 0deg 4deg, rgba(255, 244, 200, .8) 4.4deg 4.9deg, rgba(255, 255, 255, 0) 5.3deg 9deg); -webkit-mask: radial-gradient(ellipse at 50% 50%, transparent 42%, #000 78%); mask: radial-gradient(ellipse at 50% 50%, transparent 42%, #000 78%); }
.speed.on { opacity: .75; animation: spin .5s linear infinite; }
@keyframes spin { to { transform: rotate(9deg); } }

/* Etiquetas sobre los jugadores */
.tags { position: absolute; inset: 0; overflow: hidden; }
.tagp { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; }
.tagp span { position: absolute; left: 0; bottom: 13px; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: #fff; background: rgba(16, 28, 76, .82); border-radius: 8px; padding: 2px 7px 3px; white-space: nowrap; box-shadow: inset 0 -2px 0 var(--c); }
.tagp em { position: absolute; left: -9px; bottom: 0; width: 18px; height: 11px; background: var(--c); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.tagp.mine em { left: -13px; width: 26px; height: 16px; animation: bob .55s ease-in-out infinite alternate; filter: none; }
.tagp.mine span { background: var(--yellow); color: var(--ink); bottom: 20px; box-shadow: none; }
.tagp u { position: absolute; left: -22px; bottom: -9px; width: 44px; height: 6px; border-radius: 4px; background: rgba(16, 28, 76, .7); opacity: 0; transition: opacity .25s; overflow: hidden; }
.tagp u.on { opacity: 1; } .tagp u i { position: absolute; inset: 1px; border-radius: 3px; background: #5fe36a; transform-origin: 0 50%; } .tagp u.low i { background: var(--red); }
.tagp.off em { clip-path: polygon(0 12%, 100% 50%, 0 88%, 26% 50%); width: 34px; height: 34px; left: -17px; bottom: -17px; transform: rotate(var(--r)); animation: none; }
.tagp.off span { display: none; }
@keyframes bob { to { transform: translateY(5px); } }

/* Barra de carga del disparo */
.gauge { position: absolute; left: -52px; top: -14px; width: 104px; height: 15px; border-radius: 9px; background: rgba(16, 28, 76, .88); padding: 3px; opacity: 0; transition: opacity .1s; box-shadow: 0 3px 8px rgba(10, 22, 66, .35); will-change: transform; }
.gauge.on { opacity: 1; }
.gauge i { display: block; height: 100%; border-radius: 6px; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
.gauge .gz { position: absolute; top: 0; bottom: 0; left: calc(3px + (100% - 6px) * var(--z0f, .625)); width: calc((100% - 6px) * var(--zwf, .1875)); background: var(--yellow); border-radius: 3px; box-shadow: 0 0 10px var(--yellow); }
.gauge i { position: relative; z-index: 1; mix-blend-mode: normal; opacity: .92; }
.gauge[data-z="1"] i { background: #ff6a1c; } .gauge[data-z="2"] i { background: #ff9d5c; } .gauge[data-z="3"] i { background: var(--red); }
.gauge[data-z="1"] { animation: zone .12s linear infinite alternate; }
@keyframes zone { to { box-shadow: 0 0 0 4px var(--yellow), 0 3px 8px rgba(10, 22, 66, .35); } }

/* Radar */
.radar { position: absolute; left: 50%; bottom: calc(var(--sb) - 2px); width: clamp(104px, 15vw, 150px); height: auto; transform: translateX(-50%); opacity: .92; }
.hud.replay .radar, .hud.replay .tags, .hud.replay .gauge, .hud.replay .pad, .hud.replay .stick, .hud.replay .pops { opacity: 0; pointer-events: none; }
.hud.replay .ab, .hud.replay .zone, .hud.scene .ab, .hud.scene .zone { pointer-events: none; }
.hud.scene .pad, .hud.scene .stick, .hud.scene .radar, .hud.scene .tags, .hud.scene .gauge, .hud.scene .keybar, .hud.scene .toasts { opacity: 0; }
.pad, .radar, .keybar { transition: opacity .25s; }

/* Ayuda de teclas y consejos para quien empieza */
.keybar { position: absolute; right: var(--sr); bottom: var(--sb); display: none; gap: 8px; } .keybar.on { display: flex; } .touch .keybar { display: none; }
.keybar span { display: flex; align-items: center; gap: 7px; background: rgba(16, 28, 76, .82); color: #fff; border-radius: 12px; padding: 6px 11px 6px 6px; }
.keybar kbd { font: 400 16px/1 'Lilita One', sans-serif; background: var(--card); color: var(--ink); border-radius: 8px; min-width: 27px; height: 27px; display: grid; place-items: center; padding: 0 6px; box-shadow: 0 2px 0 #b9c2dd; }
.keybar b { font-size: 13px; font-weight: 800; }
.coach { position: absolute; left: 50%; bottom: calc(var(--sb) + 108px); transform: translate(-50%, 16px); display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(430px, 88vw); background: var(--card); border-radius: 18px; padding: 9px 15px 9px 9px; box-shadow: 0 5px 0 rgba(22, 32, 74, .25), 0 12px 26px rgba(10, 22, 66, .3); opacity: 0; transition: opacity .25s, transform .35s cubic-bezier(.2, 1.4, .4, 1); }
.coach.on { opacity: 1; transform: translate(-50%, 0); }
.coach i { width: 40px; height: 40px; flex: none; border-radius: 13px; background: var(--orange); color: #fff; display: grid; place-items: center; } .coach i svg { width: 25px; height: 25px; }
.coach p { margin: 0; font-size: 14px; line-height: 1.32; font-weight: 800; }

/* Mandos táctiles */
.zone { position: absolute; left: 0; top: 18%; bottom: 0; width: 50%; pointer-events: auto; touch-action: none; display: none; }
.stick { position: absolute; left: 0; top: 0; width: calc(var(--u) * 1.5); height: calc(var(--u) * 1.5); border-radius: 50%; background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .6); opacity: 0; transition: opacity .12s; display: none; }
.stick.on { opacity: 1; }
.stick i { position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; border-radius: 50%; background: #fff; box-shadow: 0 6px 14px rgba(10, 22, 66, .35); transform: translate(-50%, -50%); }
.pad { position: absolute; right: var(--sr); bottom: var(--sb); width: calc(var(--u) * 2.5); height: calc(var(--u) * 2.5); display: none; }
.touch .zone, .touch .stick, .touch .pad { display: block; }
.ab { pointer-events: auto; position: absolute; width: var(--u); height: var(--u); border-radius: 50%; color: #fff; background: var(--bg, var(--blue)); box-shadow: 0 6px 0 rgba(10, 22, 66, .32), 0 12px 24px rgba(10, 22, 66, .28), inset 0 0 0 4px rgba(255, 255, 255, .85); touch-action: none; transition: transform .06s; }
.ab::after { content: ''; position: absolute; inset: -9px; border-radius: 50%; }
.ab span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.ab svg { width: 42%; height: auto; } .ab b { font: 400 13px/1 'Lilita One', sans-serif; letter-spacing: .03em; }
.ab.down { transform: translateY(4px) scale(.96); }
.ab.shoot { --bg: var(--orange); right: 0; bottom: 0; width: calc(var(--u) * 1.28); height: calc(var(--u) * 1.28); }
.ab.shoot b { font-size: 16px; }
.ab.pass { --bg: var(--blue); right: calc(var(--u) * 1.42); bottom: 2px; }
.ab.sprint { --bg: var(--violet); right: calc(var(--u) * .34); bottom: calc(var(--u) * 1.45); }
.ab.shoot.def { --bg: var(--green); } .ab.pass.def { --bg: #24407f; }
.ab.shoot.comet { --bg: var(--pink); animation: cometBtn .4s ease-in-out infinite alternate; }
@keyframes cometBtn { to { box-shadow: 0 6px 0 rgba(10, 22, 66, .32), 0 0 0 10px rgba(255, 210, 63, .75), inset 0 0 0 4px var(--yellow); } }
.ab .ring { position: absolute; inset: -11px; border-radius: 50%; opacity: 0; transition: opacity .1s; background: conic-gradient(transparent var(--z0), var(--yellow) 0 calc(var(--z0) + var(--zw)), transparent 0), conic-gradient(#fff var(--p, 0%), rgba(16, 28, 76, .75) 0); -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 11px), #000 calc(100% - 10px)); mask: radial-gradient(closest-side, transparent calc(100% - 11px), #000 calc(100% - 10px)); }
.ab.charging .ring { opacity: 1; }
.ab.charging[data-z="1"] .ring { background: conic-gradient(#ff6a1c var(--p, 0%), var(--yellow) 0); }
.ab.charging[data-z="3"] .ring { background: var(--red); }

/* Cuenta atrás */
.count { position: absolute; left: 50%; top: 42%; font: 400 min(34vmin, 260px)/1 'Lilita One', sans-serif; color: #fff; -webkit-text-stroke: 16px var(--ink); paint-order: stroke fill; transform: translate(-50%, -50%); opacity: 0; white-space: nowrap; }
.count.on { animation: cnt .98s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.count.word { font-size: min(17vmin, 130px); color: var(--yellow); }
.count.long { animation-duration: 2.7s; }
@keyframes cnt { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); } 22% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 76% { opacity: 1; transform: translate(-50%, -50%) scale(.94); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } }

/* Repetición */
.bars i { position: absolute; left: 0; right: 0; height: 0; background: #0a1230; transition: height .3s; }
.bars i:first-child { top: 0; } .bars i:last-child { bottom: 0; }
.hud.replay .bars i { height: max(9vh, calc(var(--st) + 54px)); } .hud.replay .bars i:last-child { height: 8vh; }
.rtag { position: absolute; left: var(--sl); bottom: calc(8vh + 12px); display: flex; align-items: center; gap: 8px; background: var(--red); color: #fff; font: 400 18px/1 'Lilita One', sans-serif; padding: 8px 14px; border-radius: 12px; opacity: 0; transform: translateX(-30px); transition: opacity .25s, transform .3s; }
.rtag i { width: 11px; height: 11px; border-radius: 50%; background: #fff; animation: blink .5s steps(2) infinite; }
.hud.replay .rtag { opacity: 1; transform: none; }
@keyframes blink { to { opacity: .15; } }
.skip { pointer-events: auto; position: absolute; right: var(--sr); bottom: calc(8vh + 10px); display: flex; align-items: center; gap: 6px; background: var(--card); color: var(--ink); font: 400 17px/1 'Lilita One', sans-serif; padding: 10px 14px; border-radius: 13px; box-shadow: 0 4px 0 rgba(22, 32, 74, .3); }
.skip svg { width: 16px; height: 16px; }

/* Cartel del gol */
.goal { position: fixed; inset: 0; z-index: 8; pointer-events: none; display: none; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 12px calc(var(--sb) + 4vh); overflow: hidden; }
.goal.on { display: flex; }
.goal .gs { position: absolute; left: -20%; right: -20%; bottom: calc(var(--sb) + 11vh); height: min(25vh, 190px); background: var(--c); transform: skewY(-5deg) scaleX(0); transform-origin: 0 50%; animation: band .5s cubic-bezier(.2, .9, .2, 1) forwards; box-shadow: 0 -12px 0 var(--c2), 0 12px 0 var(--c2); }
.goal .gt { position: relative; display: flex; font: 400 min(calc(150vw / var(--n, 6)), 22vh, 190px)/1 'Lilita One', sans-serif; color: #fff; -webkit-text-stroke: clamp(8px, 2.4vmin, 18px) var(--ink); paint-order: stroke fill; transform: rotate(-4deg); margin-bottom: 1vh; }
.goal .gt span { animation: letter .6s cubic-bezier(.2, 1.7, .35, 1) both, wob .5s ease-in-out infinite alternate; animation-delay: calc(var(--i) * 55ms), calc(.6s + var(--i) * 70ms); }
.goal.comet .gt span { color: var(--yellow); }
.goal .gn { position: relative; display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 18px; padding: 8px 18px 8px 10px; box-shadow: 0 6px 0 rgba(22, 32, 74, .3), 0 14px 30px rgba(10, 22, 66, .35); animation: rise .5s .35s cubic-bezier(.2, 1.4, .4, 1) both; max-width: 94vw; }
.goal .gn .cr { width: 44px; height: 44px; flex: none; } .goal .gn .cr svg { width: 100%; height: 100%; }
.goal .gn b { display: block; font: 400 25px/1.05 'Lilita One', sans-serif; } .goal .gn small { display: block; font-size: 13px; font-weight: 700; color: var(--mute); }
.goal .gn small:empty { display: none; }
.goal .gn em { font: 400 20px/1 'Lilita One', sans-serif; color: #fff; background: var(--ink); border-radius: 11px; padding: 8px 11px; white-space: nowrap; }
.goal .gb { position: relative; margin-top: 8px; font: 400 19px/1 'Lilita One', sans-serif; color: var(--ink); background: var(--yellow); border-radius: 12px; padding: 7px 14px; animation: rise .5s .6s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes band { to { transform: skewY(-5deg) scaleX(1); } }
@keyframes letter { from { transform: translateY(60vh) scale(2) rotate(30deg); opacity: 0; } }
@keyframes wob { from { translate: 0 -3%; } to { translate: 0 4%; } }

/* Cortinilla del cometa */
.wipe { position: fixed; inset: 0; z-index: 12; pointer-events: none; overflow: hidden; visibility: hidden; }
.wipe.on { visibility: visible; animation: hide 0s .85s forwards; }
.wipe i { position: absolute; top: -10%; bottom: -10%; left: -60%; width: 52%; transform: skewX(-18deg); }
.wipe.on i { animation: sweep .8s cubic-bezier(.55, .1, .4, 1) both; }
.wipe i:nth-child(1) { background: var(--c2); } .wipe i:nth-child(2) { background: var(--c); animation-delay: .04s; width: 130%; left: -140%; } .wipe i:nth-child(3) { background: #fff; width: 14%; animation-delay: .1s; }
@keyframes sweep { from { translate: -20vw 0; } to { translate: 270vw 0; } }
@keyframes hide { to { visibility: hidden; } }

/* Presentación */
.vs { position: fixed; inset: 0; z-index: 9; pointer-events: none; display: grid; grid-template-columns: 1fr 1fr; align-items: center; overflow: hidden; visibility: hidden; transition: visibility 0s .5s; }
.vs.on { visibility: visible; transition: none; }
.vs .vt { position: relative; height: min(46vh, 330px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--c); color: #fff; transition: transform .45s cubic-bezier(.3, .9, .3, 1); }
.vs .vt.a { transform: translateX(-110%) skewY(-4deg); box-shadow: 0 10px 0 var(--ink), 0 -10px 0 var(--ink); } .vs .vt.b { transform: translateX(110%) skewY(-4deg); box-shadow: 0 10px 0 var(--ink), 0 -10px 0 var(--ink); }
.vs.on .vt { transform: skewY(-4deg); }
.vs .cr { width: min(22vmin, 130px); } .vs .cr svg { width: 100%; filter: drop-shadow(0 6px 0 rgba(10, 22, 66, .3)); }
.vs .vt > b { font: 400 clamp(22px, 5.4vmin, 44px)/1 'Lilita One', sans-serif; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.vs ul { list-style: none; margin: 0; padding: 0 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.vs li { font-size: 13px; font-weight: 800; background: var(--ink); border-radius: 9px; padding: 3px 9px; }
.vs .vx { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); z-index: 2; font: 400 min(20vmin, 130px)/1 'Lilita One', sans-serif; color: var(--yellow); -webkit-text-stroke: 14px var(--ink); paint-order: stroke fill; transition: transform .35s cubic-bezier(.2, 1.8, .4, 1); }
.vs.on .vx { transform: translate(-50%, -50%) scale(1) rotate(-6deg); transition-delay: .25s; }

/* ---------------------------------------------------------------- Pantallas */
.screens { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.screen { position: absolute; inset: 0; display: none; padding: var(--st) var(--sr) var(--sb) var(--sl); }
.screen.on { display: flex; }
.screen.on > * { pointer-events: auto; }
.mb { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; border-radius: 18px; padding: 8px 16px 8px 10px; color: #fff; background: var(--bg, var(--blue)); text-align: left; box-shadow: 0 6px 0 var(--ed, #1a55c4), 0 12px 24px rgba(10, 22, 66, .24); transition: transform .1s, box-shadow .1s, filter .15s; }
.mb:hover { filter: brightness(1.06); } .mb:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ed, #1a55c4), 0 6px 14px rgba(10, 22, 66, .24); }
.mb:focus-visible, .rb:focus-visible, .chip:focus-visible, .seg button:focus-visible, .modes button:focus-visible, .crests button:focus-visible, .tog button:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; }
.mb[disabled] { filter: grayscale(.8) brightness(.95); opacity: .7; cursor: default; }
.mb .ic { width: 40px; height: 40px; flex: none; border-radius: 12px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; } .mb .ic svg { width: 25px; height: 25px; }
.mb b { display: block; font: 400 20px/1.1 'Lilita One', sans-serif; letter-spacing: .01em; } .mb small { display: block; font-size: 12.5px; font-weight: 700; opacity: .92; line-height: 1.25; }
.mb.big { min-height: 68px; } .mb.big b { font-size: 25px; } .mb.center { justify-content: center; } .mb.center span { flex: none; }
.mb.orange { --bg: var(--orange); --ed: #c45f00; } .mb.blue { --bg: var(--blue); --ed: #1a55c4; } .mb.violet { --bg: var(--violet); --ed: #5414bd; } .mb.green { --bg: var(--green); --ed: #0f8a3e; } .mb.gray { --bg: #5b678f; --ed: #414b70; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: var(--card); color: var(--ink); border-radius: 13px; padding: 8px 12px; font-size: 13px; font-weight: 800; box-shadow: 0 4px 0 rgba(22, 32, 74, .2); } .chip svg { width: 18px; height: 18px; }
.chip.streak { background: var(--yellow); }

/* Portada */
.title { justify-content: space-between; align-items: stretch; }
.title .col { width: min(40vw, 420px); display: flex; flex-direction: column; justify-content: center; gap: 12px; margin-left: clamp(4px, 3vw, 48px); }
.title .logo { width: 100%; max-height: 40vh; object-fit: contain; filter: drop-shadow(0 12px 18px rgba(10, 22, 66, .35)); animation: float 3s ease-in-out infinite; }
.tagline { margin: -6px 0 2px; text-align: center; font: 400 clamp(16px, 2.6vmin, 22px)/1.15 'Lilita One', sans-serif; color: #fff; -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.menu { display: flex; flex-direction: column; gap: 13px; } .row.low { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.kit { align-self: flex-end; margin: 0 clamp(8px, 8vw, 150px) 10px 0; background: var(--card); border-radius: 20px; padding: 8px 12px 10px; text-align: center; box-shadow: 0 6px 0 rgba(22, 32, 74, .2), 0 14px 28px rgba(10, 22, 66, .26); }
.kit small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.pick { display: flex; align-items: center; gap: 10px; } .pick .cr { width: 42px; height: 42px; } .pick .cr svg { width: 100%; height: 100%; } .pick b { font: 400 22px/1 'Lilita One', sans-serif; min-width: 106px; text-align: left; }
.pick .rb { background: var(--soft); box-shadow: none; }
@keyframes float { 50% { transform: translateY(-7px) rotate(-.6deg); } }

/* Tarjetas */
.panel { align-items: center; justify-content: center; }
.card { background: var(--card); border-radius: 26px; padding: 16px; width: min(560px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; display: flex; flex-direction: column; gap: 13px; box-shadow: 0 8px 0 rgba(22, 32, 74, .24), 0 24px 60px rgba(10, 22, 66, .42); animation: cardIn .35s cubic-bezier(.2, 1.3, .4, 1); scrollbar-width: none; }
.card.small { width: min(400px, 100%); } .card.center { align-items: center; text-align: center; }
@keyframes cardIn { from { transform: translateY(26px) scale(.95); opacity: 0; } }
.card header { display: flex; align-items: center; gap: 12px; } .card header .rb { background: var(--soft); box-shadow: none; }
.card h2 { margin: 0; font: 400 25px/1.1 'Lilita One', sans-serif; } .card p { margin: 0; font-size: 14px; line-height: 1.45; color: #414b70; }
.card label, .joinbox label { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--mute); display: block; margin-bottom: 6px; }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; background: var(--soft); border-radius: 16px; padding: 5px; } .seg.four { grid-template-columns: repeat(4, 1fr); }
.seg button { border-radius: 12px; padding: 11px 4px; font-size: 14px; font-weight: 800; color: #4a5580; } .seg button.sel { background: var(--blue); color: #fff; box-shadow: 0 3px 0 #1a55c4; }
.crests { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; } .crests button { border-radius: 15px; padding: 8px 2px 6px; background: var(--soft); display: flex; flex-direction: column; align-items: center; gap: 3px; } .crests svg { width: 38px; height: 38px; } .crests small { font-size: 10.5px; font-weight: 800; color: #4a5580; }
.crests button.sel { background: var(--yellow); box-shadow: 0 3px 0 #c99a00; } .crests button.sel small { color: var(--ink); }
.keys { font-size: 12.5px !important; font-weight: 600; background: var(--soft); border-radius: 13px; padding: 9px 12px; } .keys:empty { display: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; align-items: stretch; }
.two .up { grid-column: 1 / -1; justify-content: center; } .two .up span { flex: none; }
.hint { text-align: center; font-weight: 700; } .hint:empty { display: none; }
.err { background: #ffe3e0; color: #a81426 !important; border-radius: 12px; padding: 9px 12px; font-weight: 700; text-align: center; }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; } .modes button { background: var(--soft); border-radius: 18px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; } .modes b { font: 400 clamp(16px, 4.6vw, 20px)/1 'Lilita One', sans-serif; white-space: nowrap; } .modes small { font-size: 11.5px; font-weight: 700; color: var(--mute); line-height: 1.2; }
.modes button.sel { background: var(--blue); color: #fff; box-shadow: 0 4px 0 #1a55c4; } .modes button.sel small { color: #dfeaff; }
.dots { display: flex; align-items: center; gap: 3px; height: 16px; } .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--blue); } .dots i.r { background: var(--red); } .dots u { width: 3px; height: 15px; border-radius: 2px; background: currentColor; opacity: .45; margin: 0 2px; } .modes .sel .dots i { background: #fff; } .modes .sel .dots i.r { background: var(--yellow); }
.name[hidden] { display: none; } .name:not([hidden]) { display: grid !important; grid-template-columns: auto 1fr; align-items: center; gap: 10px; margin: 0 !important; } .name input, .joinbox input { width: 100%; border: 0; border-radius: 13px; background: var(--soft); padding: 11px 13px; font-size: 16px; font-weight: 800; user-select: text; -webkit-user-select: text; outline: none; min-width: 0; } .name input:focus, .joinbox input:focus { box-shadow: 0 0 0 3px var(--blue); }
.joinbox { background: var(--soft); border-radius: 18px; padding: 9px 10px 10px; } .joinbox > div { display: grid; grid-template-columns: 1fr auto; gap: 7px; } .joinbox input { background: #fff; text-transform: uppercase; letter-spacing: .12em; padding: 9px 10px; } .joinbox .mb { min-height: 42px; width: auto; padding: 6px 13px; border-radius: 13px; box-shadow: 0 4px 0 var(--ed); } .joinbox .mb b { font-size: 16px; }

/* Buscando jugadores: una estrella con su estela da vueltas alrededor del balón (todo gira sobre su propio centro) */
.spinner { position: relative; width: 108px; height: 108px; flex: none; }
.spinner i { position: absolute; inset: 0; color: var(--orange); animation: orbit 1.35s linear infinite; }
.spinner i::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: conic-gradient(rgba(255, 138, 26, 0) 8%, rgba(255, 138, 26, .28) 42%, var(--orange) 84%, var(--yellow)); -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 10px), #000 calc(100% - 9px)); mask: radial-gradient(closest-side, transparent calc(100% - 10px), #000 calc(100% - 9px)); }
.spinner i svg { position: absolute; left: 50%; top: 0; width: 30px; height: 30px; margin-left: -15px; }
.spinner b { position: absolute; inset: 29px; animation: orbit 3.4s linear infinite; }
.spinner b svg { width: 100%; height: 100%; }
@keyframes orbit { to { transform: rotate(360deg); } }
.codebox { display: flex; align-items: center; gap: 12px; background: var(--soft); border-radius: 18px; padding: 9px 12px; flex-wrap: wrap; } .codebox small { font-size: 12px; font-weight: 800; color: var(--mute); } .codebox b { font: 400 31px/1 'Lilita One', sans-serif; letter-spacing: .1em; color: var(--blue); user-select: text; -webkit-user-select: text; } .codebox .chip { margin-left: auto; }
.cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 9px; align-items: center; } .cols .vx { font: 400 25px/1 'Lilita One', sans-serif; color: var(--orange); }
.tcol { display: flex; flex-direction: column; gap: 6px; } .tcol .th { display: flex; align-items: center; gap: 8px; } .tcol .th svg { width: 34px; height: 34px; } .tcol .th b { font: 400 18px/1 'Lilita One', sans-serif; }
.tcol .pl { display: flex; align-items: center; justify-content: space-between; min-height: 40px; background: var(--soft); border-radius: 13px; padding: 7px 11px; font-size: 14px; font-weight: 800; } .tcol .pl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tcol .pl i { width: 20px; height: 20px; color: var(--green); flex: none; }
.tcol .pl.free { color: #9aa3c4; background: none; box-shadow: inset 0 0 0 2px #dbe3f7; } .tcol .pl.me { box-shadow: inset 0 0 0 3px var(--yellow); } .tcol .pl.ready { background: #dff7e6; }

/* Resultados */
.results { text-align: center; } .results h1 { margin: 0; font: 400 clamp(38px, 9vmin, 62px)/1 'Lilita One', sans-serif; color: var(--blue); animation: letter .7s cubic-bezier(.2, 1.5, .35, 1); }
[data-res="win"] h1 { color: var(--orange); } [data-res="lose"] h1 { color: #5b678f; }
.final { display: flex; align-items: center; justify-content: center; gap: 14px; } .final .cr { width: 56px; height: 56px; } .final .cr svg { width: 100%; height: 100%; } .final b { font: 400 54px/1 'Lilita One', sans-serif; } .final i { font: 400 34px/1 'Lilita One', sans-serif; color: var(--mute); }
.mvp { background: var(--yellow); border-radius: 16px; padding: 8px 14px; display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 4px 10px; } .mvp small { font-size: 12px; font-weight: 800; } .mvp b { font: 400 22px/1 'Lilita One', sans-serif; } .mvp em { font-style: normal; font-size: 13px; font-weight: 700; }
.stats { display: grid; gap: 8px; } .sr { display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; gap: 2px 8px; } .sr b { font: 400 18px/1 'Lilita One', sans-serif; } .sr span { font-size: 13px; font-weight: 700; color: #414b70; } .sr .sb { grid-column: 1 / -1; display: flex; gap: 3px; height: 8px; } .sr .sb i { display: block; height: 100%; border-radius: 5px; min-width: 4px; transition: width .6s; box-shadow: inset 0 0 0 1px rgba(22, 32, 74, .12); }

.tog { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .tog button { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: var(--soft); border-radius: 13px; padding: 10px 12px; font-size: 13.5px; font-weight: 800; } .tog i { font-style: normal; font-size: 12px; background: #c9d2ea; border-radius: 8px; padding: 3px 8px; } .tog .sel i { background: var(--green); color: #fff; }
.howgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; } .hc { display: flex; gap: 11px; align-items: flex-start; } .hc:last-child { grid-column: 1 / -1; } .hc .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; } .hc .ic svg { width: 27px; height: 27px; } .hc b { font: 400 18px/1.1 'Lilita One', sans-serif; } .hc p { font-size: 13px; line-height: 1.38; }
.ic.blue { background: var(--blue); } .ic.orange { background: var(--orange); } .ic.violet { background: var(--violet); } .ic.green { background: var(--green); } .ic.pink { background: var(--pink); }

/* Vertical */
@media (max-aspect-ratio: 95/100) {
  .title { flex-direction: column; align-items: center; justify-content: space-between; }
  .title .col { display: contents; }
  .title .logo { order: 0; width: min(78vw, 360px); max-height: 25vh; }
  .title .tagline { order: 1; margin: -10px 0 auto; }
  .title .kit { order: 2; align-self: center; margin: 0 0 10px; padding: 5px 10px 7px; }
  .title .menu { order: 3; width: min(430px, 100%); } .title .row.low { order: 4; justify-content: center; margin: 12px 0 0; }
  .howgrid { grid-template-columns: 1fr; } .pops { top: 22%; } .radar { display: none; }
  .board { min-width: 0; } .board .side { gap: 6px; padding: 5px 8px; } .board .tag { font-size: 14px; } .board .sc { font-size: 28px; } .board .mid { min-width: 64px; padding: 4px 8px; } .board .clock { font-size: 21px; }
  .board .cr { width: 23px; height: 23px; } .board .side.a { padding-left: 12px; } .board .side.b { padding-right: 12px; }
  .toasts { top: calc(var(--st) + 150px); } .pops { top: 30%; } .coach { bottom: auto; top: calc(var(--st) + 78px); }
  .goal { padding-bottom: calc(var(--sb) + 7vh); } .goal .gs { bottom: calc(var(--sb) + 14vh); height: 18vh; }
  .rtag { bottom: calc(8vh + 12px); }
  .vs { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; height: 70vh; top: 15vh; bottom: auto; } .vs .vt { height: 100%; } .vs .cr { width: 24vmin; }
}
@media (max-width: 410px) { .tog button { font-size: 12.5px; padding: 10px 9px; } .board .cr { display: none; } .board .side { padding: 5px 9px; } .board .tag { font-size: 15px; } .board .mid { min-width: 60px; padding: 4px 6px; } }
@media (max-width: 800px) { html:not(.touch) .radar { display: none; } }
@media (max-width: 480px) { .two { gap: 8px; } .mb { padding-right: 10px; gap: 9px; } .mb b { font-size: 18px; } .mb small { font-size: 11.5px; } [data-s="online"] .two { grid-template-columns: 1fr; } .crests small { font-size: 9.500px; } .crests svg { width: 34px; height: 34px; } .seg button { font-size: 13px; } }
/* Marco bajo (el de la página del juego en el ordenador): resultados en dos columnas y los tres botones en una fila */
@media (max-height: 640px) and (min-aspect-ratio: 95/100) {
  .results { width: min(680px, 100%); gap: 9px; } .results .stats { grid-template-columns: 1fr 1fr; gap: 6px 18px; } .results .two:has(.up:not([hidden])) { grid-template-columns: 1fr 1fr 1fr; } .two .up { grid-column: auto; }
  .results h1 { font-size: 44px; } .final b { font-size: 44px; } .final .cr { width: 46px; height: 46px; }
}
/* Pantallas bajas (móvil en horizontal) */
@media (max-height: 480px) and (min-aspect-ratio: 95/100) {
  .title .col { gap: 8px; width: min(44vw, 340px); } .title .logo { max-height: 36vh; } .mb { min-height: 48px; padding: 5px 12px 5px 8px; border-radius: 15px; } .mb.big { min-height: 54px; } .mb.big b { font-size: 20px; } .mb b { font-size: 17px; } .mb small { font-size: 11px; } .mb .ic { width: 34px; height: 34px; }
  .menu { gap: 10px; } .tagline { display: none; } .card { padding: 12px; gap: 9px; border-radius: 20px; width: min(680px, 100%); } .card h2 { font-size: 21px; } .card header .rb { width: 36px; height: 36px; } .results h1 { font-size: 34px; } .final b { font-size: 38px; } .final .cr { width: 40px; height: 40px; }
  .coach { bottom: calc(var(--sb) + 76px); padding: 6px 12px 6px 6px; max-width: 43vw; } .coach i { width: 32px; height: 32px; } .coach p { font-size: 12.5px; }
  .kit { margin-bottom: 2px; padding: 4px 10px 6px; } .hc p { font-size: 12px; } .radar { width: 108px; } .board .side { padding-top: 3px; padding-bottom: 3px; } .board .sc { font-size: 27px; }
  .results .two:has(.up:not([hidden])) { grid-template-columns: 1fr 1fr 1fr; } .two .up { grid-column: auto; } [data-s="how"] .keys { display: none; } .howgrid { gap: 8px 14px; } .results { gap: 7px; } .mvp { padding: 5px 12px; } .sr { gap: 1px 8px; }
  .crests button { padding: 5px 2px 4px; } .crests svg { width: 30px; height: 30px; } .modes button { padding: 8px 6px; } .stats { grid-template-columns: 1fr 1fr; gap: 6px 18px; }
}
/* Pantallas grandes (monitor a pantalla completa): todo mayor, para verlo de lejos; sobre todo la barra de tiro */
@media (min-width: 1500px) and (min-height: 880px) {
  .hud .top, .radar, .keybar, .coach, .toasts, .rtag, .skip, .tagp > *, .title .col, .title .kit, .panel .card { zoom: 1.28; }
  .gauge { left: -72px; top: -20px; width: 144px; height: 20px; border-radius: 11px; }
}
@media (min-width: 2200px) and (min-height: 1200px) {
  .hud .top, .radar, .keybar, .coach, .toasts, .rtag, .skip, .tagp > *, .title .col, .title .kit, .panel .card { zoom: 1.7; }
  .gauge { left: -95px; top: -27px; width: 190px; height: 26px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) { .title .logo, .tagp.mine em, .goal .gt span, .speed.on { animation: none; } }
