/* Identical invisible hit regions on every device; only the letters are drawn. */
:root{--ui-red:#f13b52;--ui-blue:#397cff}
#arena .action-cue,#arena .button-token,#arena .replay-button,#arena .final-rhythm-note,#arena .final-swing-target>b,#arena .final-recovery>span,#arena #thirdSidewinderMove b,#arena #introA,#arena #introB,#arena #finalNeed{
 background:transparent!important;border:0!important;border-radius:0!important;outline:0!important;box-shadow:none!important;color:var(--action-letter,var(--ui-red))!important;-webkit-text-stroke:1.25px white;paint-order:stroke fill;text-shadow:0 1px 3px #07101ee6;
}
#arena :is(.action-cue[data-button="B"],.button-token.blue,.replay-b,.final-rhythm-note[data-button="B"],.final-swing-target>b[data-button="B"],#introB,#finalNeed[data-a="false"]){--action-letter:var(--ui-blue)}
#arena .action-cue{font-size:calc(var(--cue-size)*.85);line-height:1}
#arena :is(.action-cue,.final-rhythm-note)[data-button="AB"]{background:linear-gradient(90deg,var(--ui-red) 50%,var(--ui-blue) 50%)!important;background-clip:text!important;-webkit-background-clip:text!important;color:transparent!important}
#arena :is(.salmon-marker,.pipe-pump-mark,.pipe-launch-mark) circle{display:none}
#arena :is(.salmon-marker,.pipe-pump-mark,.pipe-launch-mark) text{fill:var(--ui-red);stroke:white;stroke-width:2px;stroke-linejoin:round;paint-order:stroke fill;font-weight:900;font-size:24px}
#arena :is(.salmon-marker[data-button="B"],.pipe-launch-mark) text{fill:var(--ui-blue)}
#arena .pipe-pump-mark .pipe-hold-label{fill:white;stroke:none;font-size:11px}
#arena .key-a{color:var(--ui-red)}#arena .key-b{color:var(--ui-blue)}
#arena .touch-controls{position:absolute!important;inset:42% 0 0!important;width:auto;height:auto;z-index:5;pointer-events:none}
#arena .action-pad{display:grid;grid-template-columns:1fr 1fr;gap:0;align-items:stretch;width:100%;height:100%}
#arena .action-pad :is(#jumpBtn,#braceBtn){position:relative;display:block;width:100%;height:100%;padding:0;margin:0;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;outline:0!important;transform:none!important;animation:none!important;filter:none!important;touch-action:none}
#arena .action-pad #jumpBtn{color:var(--ui-red)}#arena .action-pad #braceBtn{color:var(--ui-blue)}
#arena .action-pad button>span{position:absolute;bottom:max(24px,env(safe-area-inset-bottom));font:900 clamp(69px,10.35vw,126.5px)/1 Arial,sans-serif;color:inherit!important;letter-spacing:-.04em;-webkit-text-stroke:3px white;paint-order:stroke fill;text-shadow:0 3px 5px #07101ee6;animation:none!important;transition:transform .08s,opacity .08s;pointer-events:none}
#arena #braceBtn>span{left:max(22px,env(safe-area-inset-left))}#arena #jumpBtn>span{right:max(22px,env(safe-area-inset-right))}
#arena .action-pad button.held>span{transform:scale(.9);opacity:.8}
#arena .action-pad button:disabled{opacity:.3;pointer-events:none}
#arena .action-pad button:focus-visible>span{text-decoration:underline;text-underline-offset:8px}
#arena:not([data-input-mode="playing"]):not([data-input-mode="tutorial"]) .touch-controls{visibility:hidden;pointer-events:none}
#arena[data-input-mode="tutorial"] .touch-controls{visibility:visible}
#arena #deviceHint{line-height:1.6}

#arena .salmon-marker line{display:none}
#arena #finalNeed{display:flex;justify-content:center;gap:4px;width:48px;right:-52px}
#arena #finalNeed[hidden]{display:none}
/* Pseudo-elements cannot live inside :is(). Explicit selectors also stop the
   old mash sparks from scaling with the invisible half-screen hit regions. */
#arena .action-cue::before,#arena .action-cue::after,
#arena .action-pad #jumpBtn::before,#arena .action-pad #braceBtn::before{content:none!important;display:none!important;animation:none!important}

/* Animate the visible glyphs, never their half-screen touch targets. Every
   spark/ring is sized in glyph ems, including the small world action cues. */
#arena .action-pad button>span{display:grid;place-items:center;width:1em;height:1em}
#arena .action-cue[data-action="mash"][data-active="true"],
#arena .action-pad button.mash-mode:not(:disabled)>span,
#arena #tutorialButton.mash-mode{animation:mash-letter .24s ease-out infinite!important}
#arena .action-cue[data-action="mash"][data-active="true"]::before,
#arena .action-pad button.mash-mode:not(:disabled)>span::before,
#arena #tutorialButton.mash-mode::before{
 content:""!important;display:block!important;position:absolute;inset:auto;
 width:1.6em;height:1.6em;left:calc(50% - .8em);top:calc(50% - .8em);
 pointer-events:none;opacity:0;
 background:repeating-conic-gradient(from 8deg,transparent 0deg 37deg,#fff5bb 38deg 43deg,transparent 44deg 45deg);
 -webkit-mask:radial-gradient(circle,transparent 0 54%,#000 56% 69%,transparent 71%);
 mask:radial-gradient(circle,transparent 0 54%,#000 56% 69%,transparent 71%);
 animation:mash-sparks .24s steps(2,end) infinite!important;
}
#arena .action-cue[data-action="mash"][data-active="true"]::after,
#arena .action-pad button.mash-mode:not(:disabled)>span::after,
#arena #tutorialButton.mash-mode::after{
 content:""!important;display:block!important;position:absolute;inset:auto;
 box-sizing:border-box;width:1.2em;height:1.2em;left:calc(50% - .6em);top:calc(50% - .6em);
 border:2px solid #ffeb9e;border-radius:50%;pointer-events:none;opacity:0;
 animation:mash-ring .24s ease-out infinite!important;
}
@media(prefers-reduced-motion:reduce){
 #arena .action-cue[data-action="mash"][data-active="true"],
 #arena .action-pad button.mash-mode:not(:disabled)>span,
 #arena #tutorialButton.mash-mode{animation:none!important}
 #arena .action-cue[data-action="mash"][data-active="true"]::before,
 #arena .action-cue[data-action="mash"][data-active="true"]::after,
 #arena .action-pad button.mash-mode:not(:disabled)>span::before,
 #arena .action-pad button.mash-mode:not(:disabled)>span::after,
 #arena #tutorialButton.mash-mode::before,
 #arena #tutorialButton.mash-mode::after{display:none!important;animation:none!important}
}

/* Keep every button letter opaque, including inactive and held states. */
#arena :is(button,button>span,.action-cue,.button-token,.sequence-button,.salmon-marker,.pipe-pump-mark,.pipe-launch-mark,.final-swing-target,.spider-gauge,.cliff-hand-gauge,#pipeSwingHud svg,#salmonRhythm svg){opacity:1!important}

/* Only the inactive Cliff hand guide fades; the main A/B hit buttons stay opaque. */
#arena :is(#cliffRightGauge,#cliffLeftGauge)[data-placement="beside-athlete"][data-current="false"]{opacity:.35!important}
