/* v6.2 | Mobile no-scroll tool drawers. Desktop / engine unchanged. */
@media(max-width:840px){
 /* The game scene itself stays a full-screen viewport, never page-scrolling. */
 .content.route-game{overflow:hidden!important;overscroll-behavior:none!important}
 .game-layout.game-v4{overflow:hidden!important}
 .cq-mobile-console{overflow:visible!important}
 /* Remove the tiny scaled desktop machine from the bottom of mobile theatre;
    ECG remains at the top-left and all device controls remain in the device drawer. */
 .v4-left-dock{display:none!important}

 .cq-mobile-console.cq-is-collapsed .cq-mobile-tool-panel{display:none!important}
 .cq-mobile-console .cq-mobile-tool-panel{height:auto!important;min-height:0!important;max-height:min(47dvh,340px)!important;overflow:hidden!important;overscroll-behavior:none!important;display:flex!important;flex-direction:column!important;background:linear-gradient(180deg,#10394bf9,#051b2afc)!important}
 .cq-mobile-console .cq-mobile-tool-content{height:auto!important;min-height:0!important;max-height:none!important;overflow:hidden!important;overscroll-behavior:none!important;scrollbar-width:none!important;flex:0 0 auto!important;padding:8px 11px 9px!important}
 .cq-mobile-tool-content::-webkit-scrollbar{display:none!important}
 .cq-mobile-panel-hd{height:35px!important;min-height:35px!important;flex:0 0 35px!important}
 .cq-mobile-tabbar{position:relative;z-index:2}
 /* Do not reveal answers through open states: no auto-open, toggle with tap. */
 .cq-mobile-actions{display:flex;flex-direction:column;gap:8px;min-height:0;overflow:hidden}
 .cq-mobile-actions-heading{font-size:11px;font-weight:800;color:#a9e5f3;line-height:1.4}
 .cq-mobile-actions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;direction:rtl}
 .cq-quick-action{min-width:0;min-height:38px;max-height:46px;padding:5px 7px;border-radius:9px;border:1px solid #3b7897;background:linear-gradient(160deg,#12415a,#092c45);color:#e7fcff;font-family:inherit;font-weight:700;font-size:10px;line-height:1.45;text-align:center;white-space:normal;touch-action:manipulation}
 .cq-quick-action.cq-emphasis{background:linear-gradient(135deg,#0b888e,#0a6c77);border-color:#4beedc;color:#e6fffd;box-shadow:inset 0 0 16px #35ebdd20}
 .cq-quick-action:active{transform:scale(.97);filter:brightness(1.16)}
 .cq-mobile-actions-status{color:#a8cad9;font-size:9px;line-height:1.5;white-space:normal;min-height:14px}
 /* Device buttons are always presented together: no scrolling to SHOCK. */
 .cq-mobile-device-display{min-height:47px!important;margin-bottom:6px!important;padding:5px 10px!important}
 .cq-mobile-device-display strong{font-size:21px!important}
 .cq-mobile-device-grid{gap:5px!important}
 .cq-mobile-control{min-height:37px!important;padding:4px 3px!important;font-size:10px!important}
 .cq-mobile-device-note{font-size:8.5px!important;line-height:1.4!important;margin-top:5px!important}
 .cq-mobile-pads{gap:8px!important}
 .cq-mobile-pad{min-height:75px!important}
 .cq-mobile-pad-help{font-size:10px!important;margin:0 0 7px!important;line-height:1.45!important}
 .cq-mobile-pad-hint{font-size:9px!important;line-height:1.4!important}
 /* Guides remain tabbed, with page-by-page goals and zero nested scrolling. */
 .game-v4[data-mobile-tab="guide"] .cq-mobile-tool-panel{height:193px!important;min-height:193px!important;max-height:193px!important}
 .game-v4[data-mobile-tab="guide"] .cq-mobile-tool-content[data-tool-content="guide"]{height:155px!important;max-height:155px!important;overflow:hidden!important;padding:7px 10px!important}
 .cq-mobile-guide-simple{overflow:hidden!important}
}
@media(max-width:840px) and (max-height:720px){
 .cq-mobile-console .cq-mobile-tool-panel{max-height:min(48dvh,290px)!important}
 .cq-mobile-console .cq-mobile-tool-content{padding:5px 9px 6px!important}
 .cq-mobile-actions{gap:5px!important}
 .cq-mobile-actions-grid{gap:4px!important}
 .cq-quick-action{min-height:34px!important;max-height:40px!important;font-size:9px!important;padding:4px 5px!important}
 .cq-mobile-control{min-height:32px!important;font-size:9px!important}
 .cq-mobile-device-display{min-height:41px!important;margin-bottom:4px!important}
 .cq-mobile-device-note{display:none!important}
 .cq-mobile-pad{min-height:64px!important}
}
@media(max-width:840px) and (max-height:590px){
 .cq-mobile-console .cq-mobile-tool-panel{max-height:min(52dvh,276px)!important}
 .cq-mobile-actions-heading{font-size:9px!important}
 .cq-mobile-actions-status{font-size:8px!important}
 .cq-mobile-actions-grid{gap:3px!important}
 .cq-quick-action{min-height:29px!important;font-size:8px!important}
 .cq-mobile-device-display{min-height:36px!important}
 .cq-mobile-control{min-height:29px!important}
 .game-v4[data-mobile-tab="guide"] .cq-mobile-tool-panel{height:166px!important;min-height:166px!important;max-height:166px!important}
 .game-v4[data-mobile-tab="guide"] .cq-mobile-tool-content[data-tool-content="guide"]{height:128px!important;max-height:128px!important}
 .cq-guide-switch{flex-basis:23px!important}
}
