/* Authentication has its own stable action row. Keep the live CAPTCHA/input
   nodes out of legacy pagination, and give their scroll area the dock's space. */
.dual-console:has(#touch-controls):is([data-menu-kind=cloud-phone],[data-menu-kind=cloud-code]) #touch-controls[data-enabled=true]{display:none!important}
.dual-console[data-surface=adventure] #control-display #overlay:is([data-kind=cloud-phone],[data-kind=cloud-code]){display:flex;flex-direction:column;overflow:hidden!important;gap:8px}
#control-display #overlay:is([data-kind=cloud-phone],[data-kind=cloud-code])>.overlay-header{flex:none}
#control-display #overlay .cloud-phone{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;margin:0;gap:6px}
#control-display #overlay .cloud-phone-fields{flex:1;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;scroll-padding:8px;padding:0 2px 8px;-webkit-overflow-scrolling:touch}
#control-display #overlay .cloud-phone-fields label{margin-top:4px}
#control-display #overlay:is([data-kind=cloud-phone],[data-kind=cloud-code]) #modal-close{min-width:44px;min-height:44px;width:44px;height:44px}
#control-display #overlay .cloud-phone input{min-height:44px;font-size:16px}
#control-display #overlay .cloud-phone-status{flex:none;margin:0;max-height:3em;overflow:auto;overflow-wrap:anywhere}
#control-display #overlay .cloud-phone-status:empty{display:none}
#control-display #overlay .cloud-phone>.foot-actions{display:flex;flex-wrap:wrap;flex:none;gap:6px;margin:0;padding-top:8px;border-top:1px solid #7098a8}
#control-display #overlay .cloud-phone>.foot-actions button{flex:1 1 110px;min-height:44px;touch-action:manipulation}
#control-display #overlay .cloud-phone #code-resend{margin-top:12px;min-height:44px}
#control-display #overlay .cloud-phone #phone-captcha{margin-top:8px}
/* A phone keyboard must not push Send code under the title art or game dock.
   The measured visual viewport updates via the existing resize handler. */
@media(max-width:719px),(max-height:600px){
 .dual-console[data-surface=adventure]:is([data-menu-kind=cloud-phone],[data-menu-kind=cloud-code]){grid-template-columns:minmax(0,var(--display-width))}
 .dual-console[data-surface=adventure]:is([data-menu-kind=cloud-phone],[data-menu-kind=cloud-code]) .top-display{display:none}
 .dual-console[data-surface=adventure]:is([data-menu-kind=cloud-phone],[data-menu-kind=cloud-code]) .touch-screen:has(#overlay:not([hidden])){grid-column:1;grid-row:1;height:clamp(200px,calc(var(--auth-viewport-height,100dvh) - 80px),560px);min-height:200px;max-height:none}
 .dual-console[data-surface=adventure]:is([data-menu-kind=cloud-phone],[data-menu-kind=cloud-code]) .trainer-status{display:none}
}
