*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#061339;color:#fff;font-family:Arial,sans-serif;touch-action:none;overscroll-behavior:none}button{font-family:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;color:#e9fbff;border:1px solid #62dfff80;background:linear-gradient(#173b70,#081a43);border-radius:12px;box-shadow:0 4px 0 #020b20;font-weight:900;touch-action:none}button:focus-visible{outline:3px solid #ffd15e;outline-offset:2px}.hud{position:absolute;z-index:5;top:env(safe-area-inset-top,0);left:0;right:0;height:76px;display:flex;align-items:center;justify-content:center;gap:12px;background:linear-gradient(#071330ef,#07133090);padding:10px 16px}.logo{font-size:22px;font-weight:1000;line-height:.95;width:100px;color:#47e4ff;text-shadow:0 3px #02071c}.logo b{color:#ffcb39;display:block;font-size:28px;letter-spacing:2px}.stat{background:linear-gradient(#143562,#091c3f);border:1px solid #3ebbd980;border-radius:12px;padding:8px 15px;text-align:center;min-width:100px}.stat small{display:block;font-size:9px;letter-spacing:1px;color:#9deaff;font-weight:800}.stat strong{font-size:20px;display:block;margin-top:3px}.stat #lives{color:#ff857a}.hud button{height:46px;width:46px;font-size:25px}#arena{position:absolute;top:78px;left:0;right:0;bottom:88px;background:radial-gradient(ellipse at 50% 40%,#12446d,#051125 75%)}canvas{width:100%;height:100%;display:block}.stage{position:absolute;top:3px;left:50%;transform:translateX(-50%);width:min(90%,520px);display:flex;gap:12px;justify-content:center;color:#bfefff;font-size:11px;font-weight:900;letter-spacing:.5px;pointer-events:none}#power{color:#ffd448}.controls{position:absolute;bottom:calc(13px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);width:min(680px,95%);display:flex;align-items:center;justify-content:space-between;gap:20px;z-index:5}.direction{display:flex;align-items:center;gap:9px}.direction>button{width:58px;height:56px;font-size:23px}.direction>div{display:flex;gap:7px}.direction>div button{width:48px;height:56px;font-size:20px}.jump{width:148px;height:56px;background:linear-gradient(#39e6ff,#078bcb);color:#05244a;border:2px solid #8af4ff;font-size:13px;box-shadow:0 4px 0 #035477}.jump span{font-size:22px;margin-left:10px}.controls button.held{filter:brightness(1.5);transform:translateY(3px)}#sound{position:absolute;bottom:18px;left:16px;z-index:6;width:44px;height:44px;font-size:23px}.overlay{position:absolute;inset:0;z-index:15;background:#02091dce;display:grid;place-items:center;padding:20px;backdrop-filter:blur(4px)}.overlay[hidden]{display:none}.dialog{width:min(860px,100%);display:grid;grid-template-columns:42% 58%;background:radial-gradient(ellipse at 5% 80%,#215099,#081a42 75%);border:2px solid #35dcff;border-radius:26px;box-shadow:0 25px 70px #0009,0 0 45px #0ebeff33;overflow:hidden}.splash{display:flex;align-items:flex-end;justify-content:center;background:radial-gradient(ellipse at 50% 65%,#fbc13955,transparent 65%);padding:18px 8px 0}.splash img{display:block;width:100%;max-height:410px;object-fit:contain;filter:drop-shadow(0 8px 12px #0008)}.dialog-copy{padding:38px 30px}.eyebrow{font-size:11px;color:#ffce41;letter-spacing:1.4px;font-weight:900;margin:0 0 12px}h1{font-size:52px;letter-spacing:-2px;line-height:.97;margin:0 0 18px;text-shadow:0 4px #020c26}h1 span{color:#ffca37}#message{color:#c5d9f4;line-height:1.6;font-size:16px;margin:0 0 18px}.tips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:22px;font-size:11px}.tips span{background:#071435;border:1px solid #396795;padding:9px;border-radius:8px}#start{width:100%;height:52px;border:2px solid #a5f8ff;background:linear-gradient(#3ee7ff,#0799dc);color:#042544;font-size:15px;box-shadow:0 5px 0 #046699}#note{display:block;text-align:center;color:#99b3d7;font-size:11px;margin-top:20px}.arcade-return{top:88px!important;left:12px!important;font-size:10px!important;padding:9px 12px!important;z-index:7!important}@media(max-width:700px){.hud{height:64px;gap:6px;padding:8px}.logo{width:62px;font-size:15px}.logo b{font-size:18px}.stat{min-width:0;padding:7px 9px;flex:1;max-width:90px}.stat small{font-size:7px}.stat strong{font-size:15px}.hud button{width:34px;height:38px;font-size:21px;flex:none}#arena{top:66px;bottom:120px}.stage{font-size:9px;top:28px;gap:8px}.controls{bottom:20px;gap:12px;width:94%}.direction{gap:6px}.direction>button{width:46px;height:52px;font-size:20px}.direction>div{flex-direction:column;gap:5px}.direction>div button{width:44px;height:37px;font-size:17px}.jump{width:110px;height:55px;font-size:12px}.jump span{margin-left:5px}#sound{left:8px;bottom:100px;width:32px;height:32px;font-size:19px}.dialog{grid-template-columns:1fr;max-width:430px}.splash{height:190px;padding:12px 0 0}.splash img{height:190px;width:auto}.dialog-copy{padding:22px}h1{font-size:40px;text-align:center}.eyebrow{text-align:center;font-size:9px}#message{font-size:14px;text-align:center}.tips{justify-content:center}.tips span{font-size:10px;padding:7px}.arcade-return{top:70px!important;padding:6px 9px!important;font-size:9px!important}}
@media(max-height:500px){.hud{height:54px}.stat{padding:4px 12px}.stat strong{font-size:16px}#arena{top:55px;bottom:60px}.controls{bottom:7px}.controls button{height:40px}.direction>div{flex-direction:row}.direction>div button{height:40px}.dialog{grid-template-columns:35% 65%;max-width:730px}.splash{height:auto}.splash img{max-height:280px}.dialog-copy{padding:20px}h1{font-size:34px}.tips{margin-bottom:12px}#message{font-size:13px;margin-bottom:10px}#note{margin-top:12px}#sound{bottom:10px}}

/* Acabado de gabinete arcade: remaches, metal, luces cálidas. */
html,body{background:#211725}.hud{background:linear-gradient(#463044,#241b2f);border-bottom:4px solid #9e594b;box-shadow:0 4px #120b1c}.logo{color:#fff0bd;text-shadow:3px 3px #5b222c}.logo b{color:#ffa43a;text-shadow:3px 3px #6b2925}.stat{border:2px solid #bc7965;border-radius:4px;background:#211523;box-shadow:inset 0 0 0 2px #0c0b1a;padding:7px 15px}.stat small{color:#f4ba77}.stat strong{font-family:monospace;color:#fff3bb;font-size:22px}.hud button{border:2px solid #eeb872;border-radius:7px;background:linear-gradient(#b97045,#653826);color:#fff2b6;box-shadow:0 4px #301521}
#arena{background:radial-gradient(ellipse at 50% 35%,#6d3f50,#251e39 75%)}.stage{color:#ffe29a;text-shadow:2px 2px #351426}.controls{background:none}.direction button{background:linear-gradient(#ba6650,#713147);border:2px solid #f5ba94;color:#ffe5b0;box-shadow:0 5px #341324}.jump{background:linear-gradient(#ffd66b,#ec863b);border:2px solid #fff0b1;color:#4e231a;box-shadow:0 5px #9f4427}.controls button.held{filter:brightness(1.15);box-shadow:0 2px #341324}#sound{background:linear-gradient(#b97045,#653826);border:2px solid #eeb872;color:#ffe484}.overlay{background:#180d20d9}.dialog{background:radial-gradient(ellipse at 15% 80%,#9e5935,#3e2540 70%);border:4px solid #f6c36d;border-radius:14px;box-shadow:0 14px 0 #140c20,0 22px 65px #000a,inset 0 0 0 3px #77352b}.splash{background:radial-gradient(ellipse at 50% 70%,#ffae4966,transparent 70%)}h1{color:#fff0ba;text-shadow:3px 4px #511b27}h1 span{color:#ffb445}.eyebrow{color:#ffdc8b}#message{color:#ffe3cf}.tips span{background:#2a192c;border:2px solid #a76857;color:#ffe8b6;border-radius:5px}#start{border:2px solid #fff1bd;border-radius:8px;background:linear-gradient(#ffdb76,#ee8b3d);color:#54251b;box-shadow:0 5px #9e432b}#note{color:#e3b99e}.arcade-return{background:#2b1b30!important;border-color:#e4b875!important;color:#ffe3a0!important}
@media(max-width:700px){.stat{padding:7px 8px}.stat strong{font-size:15px}.hud{border-bottom-width:3px}.hud button{border-radius:5px}}

/* Vladi Kong: reducción visual del 10 %, sin alterar la partida. */
.splash img{transform:scale(.9);transform-origin:center bottom}

/* Controles de consola: cruceta integrada y botón de acción circular. */
.direction{display:grid;grid-template-columns:48px 48px 48px;grid-template-rows:44px 44px;gap:0;position:relative;filter:drop-shadow(0 5px 0 #100c16)}
.direction>div{display:contents}
.direction button{font-size:0!important;width:48px!important;height:44px!important;border:2px solid #63576d;background:linear-gradient(#423b4d,#211e2c);box-shadow:inset 0 2px 0 #ffffff22!important;border-radius:6px;color:transparent;position:relative}
.direction button:after{content:"";position:absolute;inset:12px 18px;border-radius:2px;background:#a99bac;box-shadow:0 1px #080711}
.direction>button[data-key="left"]{grid-column:1;grid-row:1 / 3;align-self:center;border-radius:12px 0 0 12px;border-right:0}
.direction>button[data-key="right"]{grid-column:3;grid-row:1 / 3;align-self:center;border-radius:0 12px 12px 0;border-left:0}
.direction button[data-key="up"]{grid-column:2;grid-row:1;border-radius:12px 12px 0 0;border-bottom:0}
.direction button[data-key="down"]{grid-column:2;grid-row:2;border-radius:0 0 12px 12px;border-top:0}
.direction>button:after{inset:18px 12px}
.direction:after{content:"";position:absolute;width:26px;height:26px;left:59px;top:31px;border-radius:50%;background:radial-gradient(circle at 35% 25%,#504759,#272230);box-shadow:inset 0 1px 2px #ffffff22;pointer-events:none}
.jump{width:86px!important;height:86px!important;border-radius:50%;border:4px solid #fbd2a0;background:radial-gradient(circle at 35% 25%,#ffb967,#ef7836 65%,#bd4824);color:#491e19;font-size:12px!important;box-shadow:0 6px 0 #762b24,0 0 0 5px #302135,inset 0 3px 0 #ffedb580;text-shadow:0 1px #ffd39a}
.controls button.held{transform:translateY(3px);filter:brightness(1.12)}
@media(max-height:500px){.direction{transform:scale(.65);transform-origin:center bottom;height:58px}.jump{width:48px!important;height:48px!important;font-size:9px!important}}

/* Pantalla de título sobre el escenario; sólo afecta al inicio. */
body:has(.title-screen:not([hidden])) .hud,body:has(.title-screen:not([hidden])) .controls,body:has(.title-screen:not([hidden])) .stage,body:has(.title-screen:not([hidden])) #sound{visibility:hidden}
.overlay.title-screen{padding:16px;background:radial-gradient(ellipse at 50% 38%,#42203855,#120f27cc 80%);backdrop-filter:none}
.title-screen .dialog{display:flex;flex-direction:column;align-items:center;justify-content:center;width:min(700px,100%);height:100%;max-height:900px;border:0;border-radius:0;box-shadow:none;background:none;overflow:visible}
.title-screen .splash{padding:0;height:clamp(130px,29vh,290px);width:100%;background:none;position:relative}
.title-screen .splash:after{content:"";position:absolute;bottom:0;left:15%;right:15%;height:14px;background:repeating-linear-gradient(45deg,transparent 0 13px,#63233c 14px 17px),linear-gradient(#ff9172,#a42e40);border-top:3px solid #ffd28e;box-shadow:0 5px #351726}
.title-screen .splash img{height:100%;width:auto;max-width:100%;max-height:none;z-index:1;filter:drop-shadow(0 5px 0 #281326) drop-shadow(0 0 26px #ffab4b44)}
.title-screen .dialog-copy{padding:12px 10px 0;width:100%;text-align:center}
.title-screen #eyebrow,.title-screen #message,.title-screen #note{display:none}
.title-screen h1{font-family:Impact,"Arial Black",Arial,sans-serif;font-weight:1000;font-size:clamp(54px,9vw,96px);letter-spacing:1px;line-height:.95;margin:0 0 26px;transform:rotate(-3deg);color:#fff0a2;-webkit-text-stroke:2px #863124;text-shadow:3px 3px #54202c,5px 5px #54202c,7px 7px #180d23}
.title-screen h1 span{display:block;color:#ffac32;font-size:1.25em;-webkit-text-stroke:2px #862a22}
.title-screen #start{width:auto;min-width:230px;max-width:100%;height:54px;border:0;border-radius:0;background:none;box-shadow:none;color:#ffdf68;font-family:"Arial Black",Arial,sans-serif;font-size:clamp(19px,3vw,26px);letter-spacing:1px;text-shadow:2px 3px #6d2a27,3px 4px #140d20}
.title-screen #start:hover{color:#fff5bb;transform:scale(1.04)}
.title-screen #start:active{transform:translateY(2px)}
.title-screen .tips{margin:12px 0 0;justify-content:center;order:2}
.title-screen .dialog-copy{display:flex;flex-direction:column;align-items:center}
.title-screen .tips span{background:none;border:0;font-size:11px;padding:4px 7px;color:#f1d6b2;text-shadow:1px 2px #1b1126}
@media(max-height:500px){.title-screen .dialog{display:grid;grid-template-columns:35% 65%;max-width:820px}.title-screen .splash{height:65vh}.title-screen h1{font-size:48px;margin-bottom:12px}.title-screen .dialog-copy{padding:8px}.title-screen #start{height:42px;font-size:20px}.title-screen .tips{margin-top:4px}}
@media(prefers-reduced-motion:no-preference){.title-screen #start{animation:arcade-start-glow 1.5s ease-in-out infinite}@keyframes arcade-start-glow{50%{color:#fff7c0;text-shadow:2px 3px #6d2a27,0 0 14px #ffc44388}}}

/* Acción principal de inicio: botón arcade con relieve. */
.title-screen #start{padding:0 24px;border:3px solid #ffe5a1;border-radius:12px;background:linear-gradient(#ffd46c 0%,#ffad3d 48%,#ed772b 100%);color:#4b1e1b;box-shadow:0 6px 0 #943923,0 9px 0 #241321,inset 0 2px 0 #fff2be;animation:none;text-shadow:0 1px #ffdf8c;min-height:54px}
.title-screen #start:hover{color:#4b1e1b;filter:brightness(1.08);transform:translateY(-1px)}
.title-screen #start:active{transform:translateY(4px);box-shadow:0 2px 0 #943923,0 5px 0 #241321,inset 0 2px 0 #fff2be}
.title-screen .tips{margin-top:22px}
@media(max-height:500px){.title-screen #start{min-height:42px;padding:0 18px}.title-screen .tips{margin-top:14px}}

/* Pausa, victoria y fin de partida integrados al escenario. */
.overlay.arcade-state{background:#171020bb;backdrop-filter:none}
.arcade-state .dialog{display:flex;flex-direction:column;align-items:center;width:min(650px,100%);background:none;border:0;box-shadow:none;overflow:visible}
.arcade-state .splash{height:clamp(90px,20vh,180px);width:100%;padding:0;background:none}
.arcade-state .splash img{height:100%;width:auto;max-height:none}
.arcade-state .dialog-copy{text-align:center;width:100%;padding:18px 10px}
.arcade-state h1{font-family:"Arial Black",Arial,sans-serif;font-size:clamp(32px,6vw,56px);line-height:1.05;transform:rotate(-2deg);-webkit-text-stroke:1px #68282c;text-shadow:3px 4px #6c2930,5px 6px #140d20}
.arcade-state h1 span{display:block;color:#ffbd4a}
.arcade-state #message{font-size:15px;color:#ffe3ba;text-shadow:1px 2px #160f20;max-width:440px;margin:0 auto 22px}
.arcade-state #start{width:auto;min-width:220px;max-width:100%;padding:0 22px;border:3px solid #ffe5a1;border-radius:12px;background:linear-gradient(#ffd46c,#ffad3d 48%,#ed772b);color:#4b1e1b;box-shadow:0 6px #943923,0 9px #241321,inset 0 2px #fff2be;font-size:18px}
.arcade-state #start:active{transform:translateY(4px)}
.arcade-state .tips{display:none}.arcade-state #note{margin-top:24px;color:#f0cb9e}.arcade-state .eyebrow{font-size:11px}
@media(max-height:500px){.arcade-state .dialog{display:grid;grid-template-columns:30% 70%}.arcade-state .splash{height:55vh}.arcade-state .dialog-copy{padding:6px}.arcade-state h1{font-size:30px;margin-bottom:12px}.arcade-state #message{font-size:12px;margin-bottom:12px}.arcade-state #start{height:42px;font-size:15px}.arcade-state #note{margin-top:16px}}

/* PC: tablero a altura completa y controles en los laterales. */
@media(min-width:1100px) and (min-height:600px) and (hover:hover) and (pointer:fine){
#arena{top:8px;bottom:8px;left:260px;right:260px;border-radius:12px}
.hud{top:86px;left:16px;right:auto;width:228px;height:auto;padding:18px 12px;display:flex;flex-wrap:wrap;gap:12px;border:2px solid #8a6548;border-radius:14px;justify-content:center}
.logo{width:100%;text-align:center;font-size:22px}
.logo b{font-size:30px}
.stat{width:100%;min-width:0;padding:10px 12px}
.stat small{font-size:10px}.stat strong{font-size:24px}
.arcade-return{top:18px!important;left:16px!important}
.controls{left:auto;right:24px;bottom:36px;transform:none;width:212px;flex-direction:column;gap:28px}
#sound{left:20px;bottom:20px;width:44px;height:44px}
}
