#cup-defense{position:absolute;z-index:18;display:flex;gap:8px;pointer-events:none}#cup-defense[hidden]{display:none}#cup-defense button{flex:1;min-width:0;min-height:88px;border:3px solid #ffe078;border-radius:8px;background:#102c36ed;color:#fff1c3;font:22px/1.05 VT323,monospace;pointer-events:auto;touch-action:none;padding:4px}#cup-defense button:active,#cup-defense button:focus-visible{background:#24774f;outline:3px solid white}@media(pointer:fine){#stage.cup-playing canvas{cursor:crosshair}}

/* Espaços reservados: esconder uma ação não desloca as demais. */
#root #stage #touch.world-cup button[hidden]:is([data-touch-id=special],[data-touch-id=attack],[data-touch-id=jump],[data-touch-id=dash],[data-touch-id=crouch],[data-touch-id=forward],[data-touch-id=left],[data-touch-id=right],[data-touch-id=zaga],[data-touch-id=joystick]){display:initial!important;visibility:hidden!important;pointer-events:none!important}
#stage.cup-playing #drag-touch-hint{top:var(--cup-hint-top,110px);bottom:auto}

#stage.cup-playing[data-cup-message=true] #drag-touch-hint{visibility:hidden}
#touch.world-cup.cup-defense-active button{visibility:hidden!important;pointer-events:none!important}

/* Copa: drible à esquerda das ações; dash ocupa a antiga célula do drible. */
#root #stage #touch.world-cup button[data-touch-id=attack]:not([data-touch-placed]){grid-column:4;grid-row:3}
#root #stage #touch.world-cup button[data-touch-id=dash]:not([data-touch-placed]){grid-column:5;grid-row:3}
html[data-touch-hand=left] #root #stage #touch.world-cup button[data-touch-id=attack]:not([data-touch-placed]){grid-column:3;grid-row:3}
html[data-touch-hand=left] #root #stage #touch.world-cup button[data-touch-id=dash]:not([data-touch-placed]){grid-column:2;grid-row:3}

/* O joystick já explica a direção na zaga/goleira; não cobrir o campo com a dica de arrastar. */
#stage.cup-playing[data-cup-defense=true] #drag-touch-hint{display:none!important}

/* Rótulos completos e legíveis também nas ações compactas. */
#root #stage #touch.world-cup button[data-touch-id] small{font-size:11px;line-height:1;white-space:normal;overflow-wrap:normal;letter-spacing:0}

/* CHUTAR ocupa o canto acima de PULAR, sem disputar a célula de DRIBLAR. */
#root #stage #touch.world-cup button[data-touch-id=special]:not([data-touch-placed]){grid-column:6;grid-row:2}
html[data-touch-hand=left] #root #stage #touch.world-cup button[data-touch-id=special]:not([data-touch-placed]){grid-column:1;grid-row:2}

#root #stage #touch.world-cup button[data-touch-id=special]:not([hidden]){display:flex!important}

/* Rótulo inteiro; a cor e o ícone para cima sinalizam a bola por cima. */
#root #stage #touch.world-cup button[data-touch-id=jump] small{font-size:11px;white-space:nowrap;overflow:visible;text-overflow:clip;letter-spacing:0}
#touch.world-cup button[data-cup-loft=true]{color:#ffe078;border-color:#ffb85c;animation:cup-loft-glow 1.4s ease-in-out infinite}
#touch.world-cup button[data-cup-loft=true] .px-m{fill:#ffb85c}
@keyframes cup-loft-glow{50%{box-shadow:0 0 6px #ffb85c88}}
@media(prefers-reduced-motion:reduce){#touch.world-cup button[data-cup-loft=true]{animation:none}}
html[data-reduced-effects=true] #touch.world-cup button[data-cup-loft=true]{animation:none}

/* Copa: the onboarding hint shares the floating notice treatment. */
#stage.cup-playing #drag-touch-hint{background:transparent;border:0;box-shadow:none;color:#ffe078;font-size:max(11px,1rem);text-shadow:-2px 0 #101820,2px 0 #101820,0 -2px #101820,0 2px #101820,2px 3px #101820}

#root #stage #touch.world-cup button[data-touch-id=jump] small{white-space:normal;line-height:1.1}
#touch.world-cup button[data-cup-recommended=true]{outline:2px solid currentColor;outline-offset:2px}

/* Final Copa state wins over generic transparent touch feedback. */
#root #stage #touch.world-cup button[data-cup-recommended=true]{background:#315741f5!important;box-shadow:inset 0 0 0 2px #b5f4a2;outline:2px solid currentColor}
#root #stage #touch.world-cup button[data-cup-recommended=false]{background:#101d2be8!important}

/* The shared-session badge yields to the single Copa caption strip. */
#root #stage.cup-playing[data-cup-caption=true] #shared-free{visibility:hidden!important}
@media(pointer:coarse),(max-width:900px){
 #root #stage.cup-playing[data-mode] #hud.hud-compact .hud-mission-text{display:flex;flex-wrap:nowrap;align-items:center;min-width:0;width:100%;gap:5px}
 #root #stage.cup-playing[data-mode] #hud.hud-compact .hud-phase{flex:none;font-size:12px;line-height:16px;white-space:nowrap}
 #root #stage.cup-playing[data-mode] #hud.hud-compact .hud-goal{display:block;flex:1 1 0;min-width:0;max-width:100%;font-size:13px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
 #root #stage.cup-playing[data-mode] #hud.hud-compact .hud-mission-text>.hud-chips{display:flex;flex:none;flex-wrap:nowrap;max-width:35%;overflow:hidden}
 #root #stage.cup-playing[data-mode] #hud.hud-compact .hud-mission-text .hud-chip{font-size:12px;white-space:nowrap}
}

/* Copa no celular: sem o botão de base, a tela cheia sobe para o lado da pausa, numa linha só (Pedro, 06/11). */
#root #stage[data-cup=true]:is([data-mode=play],[data-mode=fight]) #utilities:has(#base[hidden]) #fullscreen{grid-column:1;grid-row:1}

/* Desktop Copa shares the 44px utility targets and button skin with mobile. */
#root #stage.cup-playing.cup-desktop-hud[data-mode=play] #hud.hud-compact{left:var(--cup-hud-left);width:var(--cup-hud-width);box-sizing:border-box;right:auto;top:8px;bottom:auto;translate:none;transform:none}
#root #stage.cup-playing.cup-desktop-hud[data-mode=play] #utilities{display:flex;flex-direction:row;align-items:center;gap:5px;width:auto;top:8px;right:8px;bottom:auto;left:auto}
#root #stage.cup-playing.cup-desktop-hud[data-mode=play] #utilities>button:not([hidden]){position:static;display:grid;place-items:center;flex:none;margin:0}

/* O contador da goleira cabe inteiro numa linha no computador; celular mantém a quebra. */
#root #stage.cup-playing.cup-desktop-hud[data-mode=play]:has([data-touch-id=zaga]:not([hidden])) #hud.hud-compact .hud-chips,
#root #stage.cup-playing.cup-desktop-hud[data-mode=play]:has([data-touch-id=zaga]:not([hidden])) #hud.hud-compact .hud-mission .hud-chip{white-space:nowrap}
