/* Clinical Quest — v6 mobile immersive UX. Desktop dashboard & simulation untouched. */
.cq-mobile-hamburger,.cq-mobile-backdrop,.cq-mobile-close,.cq-mobile-console{display:none}
@media(max-width:840px){
 html{background:#041221}
 body{overflow-x:hidden!important}
 body:has(.cq-nav-open){overflow:hidden!important}
 .shell{position:relative;display:block!important;height:100dvh!important;min-height:100dvh!important;overflow:hidden!important;grid-template-columns:none!important}
 .mainwrap{height:100dvh!important;min-height:0!important;width:100%;overflow:hidden}
 .sidebar{position:fixed!important;inset:0 0 0 auto!important;top:0!important;right:0!important;bottom:0!important;width:min(82vw,320px)!important;height:100dvh!important;z-index:1001!important;display:flex!important;flex-direction:column!important;gap:8px!important;padding:72px 14px 24px!important;overflow-y:auto!important;overflow-x:hidden!important;transform:translateX(110%);transition:transform .3s cubic-bezier(.2,.85,.25,1);box-shadow:-15px 0 45px #000b;background:linear-gradient(160deg,#0b263c,#041326 75%)!important;border-left:1px solid #2de5e65c!important;visibility:hidden}
 .cq-nav-open .sidebar{transform:translateX(0);visibility:visible}
 .cq-mobile-backdrop{display:block;position:fixed;inset:0;background:#000b;backdrop-filter:blur(7px);z-index:1000;opacity:0;visibility:hidden;transition:.25s}
 .cq-nav-open .cq-mobile-backdrop{opacity:1;visibility:visible}
 .sidebar .brand{position:absolute;top:12px;right:15px!important;left:58px;min-height:45px!important;display:flex!important;flex-direction:row!important;align-items:center!important;width:auto;padding:0!important;margin:0!important}
 .sidebar .brand .brandname,.sidebar .brand .branddesc{display:block!important;font-size:12px!important}
 .sidebar .brandmark{width:42px!important;height:42px!important}
 .sidebar .navcaption{display:block!important;font-size:11px;margin:12px 12px 3px!important}
 .sidebar nav{display:flex!important;flex-direction:column!important;width:100%;gap:6px!important;margin:0!important}
 .sidebar .navitem,.sidebar>.navitem{height:51px!important;min-height:51px!important;width:100%!important;min-width:0!important;padding:9px 14px!important;margin:0!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:13px!important;border-radius:13px!important}
 .sidebar .navitem svg{width:21px!important;height:21px!important}
 .sidebar .navitem .navtext{font-size:13px!important;white-space:normal!important;display:inline!important}
 .sidebar .sidebarbottom{display:block!important;margin-top:auto;padding:14px}
 .cq-mobile-close{display:grid!important;place-items:center;position:absolute;top:16px;left:14px;width:38px;height:38px;border-radius:11px;border:1px solid #3d8d9f;background:#0b3850;color:#d5fbff;font-size:20px}
 .topbar{height:57px!important;min-height:57px!important;padding:0 13px!important;display:grid!important;grid-template-columns:46px minmax(0,1fr) 84px;gap:8px;align-items:center;position:relative;z-index:12}
 .cq-mobile-hamburger{display:flex!important;grid-column:1;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:43px;height:42px;border:1px solid #47dce0b3;background:linear-gradient(150deg,#0c4b61,#092d45);border-radius:12px;box-shadow:0 0 15px #19ebdf35;color:#eaffff}
 .cq-mobile-hamburger span{width:19px;height:2px;background:currentColor;border-radius:2px}
 .topbar>div:nth-child(2){grid-column:2;min-width:0}
 .topbar .crumb{justify-content:center;gap:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .topbar .crumb b{font-size:12px!important;letter-spacing:.01em}
 .topbar .latin{display:none!important}
 .topbar .topbar-beat{display:none!important}
 .topbar .topright{grid-column:3;justify-content:end;gap:5px}
 .topright .pill{display:none!important}
 .topright .avatar{width:36px!important;height:36px!important;flex:0 0 36px}
 .topright .iconbtn{width:35px;height:35px}
 .content{height:calc(100dvh - 57px)!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain;padding:11px 11px max(18px,env(safe-area-inset-bottom))!important}
 .route-game{padding:0!important;overflow:hidden!important}
 .route-game .footer-note{display:none!important}
 .game-layout.game-v4{height:100%!important;min-height:0!important;overflow:hidden!important;gap:0!important;position:relative;background:#051625}
 .v4-game-heading{flex:0 0 70px!important;min-height:0;display:flex!important;justify-content:space-between;align-items:center;gap:6px!important;flex-wrap:nowrap!important;padding:7px 12px!important;border-bottom:1px solid #44c4d143!important}
 .v4-heading-info h1{font-size:15px!important;line-height:1.4!important;max-width:46vw}
 .v4-heading-info p{display:none!important}
 .v4-eyebrow{font-size:7px!important;letter-spacing:.03em}
 .v4-heading-actions{gap:5px!important;flex-wrap:wrap!important;justify-content:flex-end!important;max-width:47%;min-width:0}
 .v4-heading-actions>.v4-live-indicator{display:none!important}
 .v4-heading-actions>.btn{display:none!important}
 .v4-hud-score,.v4-hud-time{height:30px!important;padding:0 7px!important;font-size:9px!important;border-radius:8px}
 .v4-hud-time strong{font-size:11px!important}
 .v4-stage-steps{flex:0 0 31px!important;padding:3px 10px 1px;min-height:0!important;background:#06192b}
 .game-v4 .steps{height:27px!important;gap:5px!important}
 .game-v4 .step{height:27px!important;font-size:0!important;border-radius:22px!important}
 .game-v4 .step i{font-size:10px!important}
 .game-v4 .step span{display:none!important}
 .v4-theatre{height:auto!important;min-height:0!important;flex:1 1 100%!important;display:block!important;padding:0!important;border:none!important;border-radius:0!important;overflow:hidden!important;box-shadow:none!important}
 .v4-room-photo{background-position:center center!important;filter:brightness(.71) saturate(1.1)}
 .v4-person-stage{position:absolute!important;z-index:3!important;left:0!important;right:0!important;top:0!important;bottom:0!important;width:100%!important;height:100%!important;min-height:0!important;margin:0!important;pointer-events:none!important}
 .v4-bed-frame{width:58%!important;top:7%!important;bottom:-5%!important}
 .v4-bed-rail{display:none!important}
 .v4-person-figure{height:110%!important;bottom:-14%!important;left:50%!important;aspect-ratio:2/3!important}
 .v4-spot{width:30px!important;height:30px!important;touch-action:manipulation}
 .v4-spot.pad-spot{width:38px!important;height:45px!important}
 .game-v4 .v4-spot.pad-spot.placed{width:43px!important;height:53px!important}
 .v4-clinical-floating{top:2%;font-size:8px!important}
 .v4-left-dock{position:absolute!important;display:flex!important;flex-direction:column!important;z-index:6!important;top:auto!important;right:auto!important;left:0!important;bottom:4%!important;width:235px!important;height:390px!important;gap:5px!important;min-height:0!important;max-height:none!important;transform:scale(.43)!important;transform-origin:left bottom!important;pointer-events:none!important;opacity:.98!important}
 .v4-hardware-monitor{height:121px!important;flex:0 0 121px!important;min-height:121px!important}
 .v4-monitor-bezel .monitor-wave{height:53px!important}
 .v4-defib-unit{height:246px!important;flex:1!important;min-height:246px!important;max-height:none!important}
 .v4-left-dock .v4-padtray{display:none!important}
 .v4-right-dock,.v4-lower-hud,.v4-bottom-actions{display:none!important}
 .cq-mobile-console{display:block!important;position:absolute;left:0;right:0;bottom:0;z-index:60;pointer-events:none}
 .cq-mobile-tool-panel{display:block;max-height:min(36dvh,305px);overflow:hidden;background:linear-gradient(180deg,#0a3852f5,#051c31fc);border:1px solid #36b9c0b5;border-radius:19px 19px 0 0;box-shadow:0 -14px 40px #00111aaf,0 0 25px #17dfd830;backdrop-filter:blur(18px);pointer-events:auto;animation:cqMobileRise .24s ease-out}
 .cq-mobile-panel-hd{height:37px;display:flex;justify-content:space-between;align-items:center;padding:5px 13px;border-bottom:1px solid #2a8b9d60}
 .cq-mobile-panel-hd strong{font-size:12px;color:#ecfffd}
 .cq-mobile-panel-hd button{display:flex;align-items:center;gap:3px;color:#9bd6df;background:#103b51;border-radius:8px;border:1px solid #376c80;padding:3px 8px;font-size:10px}
 .cq-mobile-tool-content{display:none;max-height:calc(min(36dvh,305px) - 37px);overflow:auto;overscroll-behavior:contain;padding:9px 12px 12px;scrollbar-width:thin}
 .game-v4[data-mobile-tab="actions"] .cq-mobile-tool-content[data-tool-content="actions"],.game-v4[data-mobile-tab="pads"] .cq-mobile-tool-content[data-tool-content="pads"],.game-v4[data-mobile-tab="device"] .cq-mobile-tool-content[data-tool-content="device"],.game-v4[data-mobile-tab="guide"] .cq-mobile-tool-content[data-tool-content="guide"]{display:block}
 .cq-mobile-tool-content .actionbox{display:block!important;min-height:0!important;height:auto!important;padding:0!important;margin:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
 .cq-mobile-tool-content .cardhead{display:none!important}
 .cq-mobile-tool-content .subhint{font-size:10px!important;margin:1px 0 7px!important;line-height:1.55}
 .cq-mobile-tool-content .actiongroup{gap:7px!important;margin:4px 0!important}
 .cq-mobile-tool-content .actiongroup .btn{min-height:42px!important;font-size:11px!important;padding:7px 10px!important}
 .cq-mobile-tool-content .divider{margin:8px 0!important}
 .cq-mobile-tool-content .notice{font-size:10px!important;padding:8px 10px!important;margin-top:7px!important}
 .cq-mobile-pad-help,.cq-mobile-pad-hint{font-size:11px;line-height:1.7;color:#b0dce6;margin:4px 0 9px}
 .cq-mobile-pad-hint{font-size:9px;margin-bottom:1px;color:#80c3d0}
 .cq-mobile-pads{display:grid;grid-template-columns:1fr 1fr;gap:9px}
 .cq-mobile-pad{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:84px;border:1px solid #3c95b2;border-radius:13px;background:linear-gradient(150deg,#0e4a61,#0a263f);color:#d8fcff}
 .cq-mobile-pad svg{color:#ffd277}.cq-mobile-pad span{font-weight:900;font-size:12px}.cq-mobile-pad small{font-size:9px;color:#afd4e2}
 .cq-mobile-pad.selected{border-color:#fff5a4;box-shadow:0 0 16px #fff3a355}.cq-mobile-pad.placed{border-color:#4bf4c5;background:#115c55}
 .cq-mobile-device-display{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:8px 13px;background:#021e2e;border:1px solid #2a708a;border-radius:11px;direction:ltr;margin-bottom:8px}
 .cq-mobile-device-display small{font:700 9px Arial,sans-serif;display:block;color:#77dedf}.cq-mobile-device-display strong{display:block;color:#53ffeb;font:900 25px Arial,sans-serif;text-shadow:0 0 15px #31ffe4}.cq-mobile-device-display strong small{display:inline;font-size:11px}
 .cq-mobile-device-state{display:flex;flex-direction:column;align-items:flex-end;gap:8px;color:#eafffd;font-size:10px}
 .cq-mobile-device-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;direction:rtl}
 .cq-mobile-control{min-height:43px;border:1px solid #437b9c;border-radius:10px;color:#e2f8fe;background:linear-gradient(150deg,#16445d,#072a41);font-size:11px;font-weight:800;touch-action:manipulation}
 .cq-mobile-control.is-selected{background:#14686e;border-color:#49f4df;box-shadow:0 0 12px #38ffdf55}
 .cq-mobile-control.is-power{border-color:#51d9c0;color:#6bffe0}.cq-mobile-control.is-charge{background:#bf792d;border-color:#ffc46d;color:#20170d}.cq-mobile-control.is-clear{background:#206486;border-color:#59e1fc}.cq-mobile-control.is-shock{background:#a52c51;border-color:#ff6585;color:white}
 .cq-mobile-device-note{margin-top:7px;color:#7fc0cf;font-size:9px;text-align:center}
 .cq-mobile-guide-content{display:grid;grid-template-columns:1fr;gap:8px}
 .cq-mobile-guide-content>.v4-floating-card{position:relative!important;width:100%!important;inset:auto!important;max-height:none!important;padding:10px!important}
 .cq-mobile-guide-content p{font-size:11px;color:#cceafa;line-height:1.8}
 .cq-mobile-tabbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;align-items:stretch;padding:8px max(12px,env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom));height:calc(66px + env(safe-area-inset-bottom));background:#041527f7;border-top:1px solid #2a778b;box-shadow:0 -8px 23px #0009;pointer-events:auto}
 .cq-mobile-tab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border-radius:11px;border:1px solid transparent;color:#8ec4d6;background:#0b2a42;font-weight:700;font-size:10px;touch-action:manipulation;min-width:0}
 .cq-mobile-tab.active{color:#d5ffff;border-color:#4af4de;box-shadow:inset 0 0 15px #10d0c05b,0 0 13px #1ad4c536;background:linear-gradient(145deg,#0b6268,#0a3a51)}
 .cq-mobile-tab svg{width:21px;height:21px}
 .cq-is-collapsed .cq-mobile-tool-panel{display:none}
 .cq-mobile-console.cq-is-collapsed .cq-mobile-tabbar{box-shadow:0 -10px 24px #000c}
 .cq-charge-event .cq-mobile-device-display{box-shadow:0 0 22px #62e4f84a}
 .game-v4 .cq-cable-layer{pointer-events:none}
 .game-v4 .v4-spot.wrong{opacity:.3!important}
 @keyframes cqMobileRise{from{transform:translateY(15px);opacity:0}to{transform:translateY(0);opacity:1}}
}
@media(max-width:380px){.v4-game-heading{flex-basis:63px!important}.v4-heading-info h1{font-size:13px!important}.v4-hud-score,.v4-hud-time{font-size:8px!important;padding:0 5px!important}.cq-mobile-tool-content .actiongroup .btn{font-size:10px!important}}
@media(prefers-reduced-motion:reduce){.cq-mobile-tool-panel,.sidebar{animation:none!important;transition:none!important}}

@media(max-width:840px){
 .v4-person-figure{height:83%!important;top:3%!important;bottom:auto!important;width:auto!important}
 .v4-bed-frame{width:56%!important;top:6%!important;bottom:3%!important;max-height:none!important}
 .cq-mobile-ecg{display:flex;flex-direction:column;gap:3px;position:absolute;z-index:5;left:9px;top:9px;width:116px;height:80px;background:linear-gradient(145deg,#031827e8,#02121aee);border:4px solid #627c93;border-top-color:#9dbac9;border-bottom-color:#284966;border-radius:11px;padding:5px 7px 3px;box-shadow:0 8px 16px #000a,inset 0 0 10px #123e46;pointer-events:none;direction:ltr}
 .cq-mobile-ecg-top{display:flex;justify-content:space-between;align-items:center;gap:3px;font:bold 9px Arial,sans-serif;color:#45ffe1}
 .cq-mobile-ecg-top span{color:#ff6585;background:#452339;padding:1px 4px;border-radius:3px}
 .cq-mobile-ecg svg{display:block;width:100%;height:39px;background:repeating-linear-gradient(90deg,#17a6a51c 0 1px,transparent 1px 8px),#001c20}
 .cq-mobile-ecg path{fill:none;stroke:#45f9aa;stroke-width:4;filter:drop-shadow(0 0 3px #53ffa1)}
 .cq-mobile-ecg small{font:bold 7px Arial,sans-serif;color:#93c3d2}
 .v4-clinical-floating{display:none!important}
 .cq-mobile-tool-panel{max-height:min(32dvh,285px)}
 .cq-mobile-tool-content{max-height:calc(min(32dvh,285px) - 37px)}
}
@media(max-height:710px) and (max-width:840px){.cq-mobile-tool-panel{max-height:min(35dvh,248px)}.cq-mobile-tool-content{max-height:calc(min(35dvh,248px) - 37px)}.cq-mobile-ecg{width:95px;height:70px}.cq-mobile-ecg svg{height:29px}}
@media(min-width:841px){.cq-mobile-ecg{display:none!important}}
@media(max-width:840px){
 .game-v4:has(.v4-theatre.cq-is-charging) .cq-mobile-device-display{position:relative;border-color:#83e9fa;box-shadow:0 0 20px #56dbff87;overflow:hidden}
 .game-v4:has(.v4-theatre.cq-is-charging) .cq-mobile-device-display:after{content:"";height:4px;position:absolute;left:0;bottom:0;width:100%;background:linear-gradient(90deg,#23cfff,#41ffdc,#ffed92);transform-origin:left;animation:cqMobileCharge 2.85s linear forwards}
 .game-v4:has(.v4-theatre.cq-is-charging) .cq-mobile-control.is-charge{animation:cqMobileChargePulse .25s infinite alternate}
 .cq-shock-event .cq-mobile-console .cq-mobile-tabbar{box-shadow:0 -12px 42px #7becffaa}
 @keyframes cqMobileCharge{from{transform:scaleX(0)}to{transform:scaleX(1)}}
 @keyframes cqMobileChargePulse{from{filter:brightness(1)}to{filter:brightness(1.45)}}
}
@media(max-width:840px){.cq-mobile-console.cq-is-collapsed .cq-mobile-tool-panel{display:none!important}}
@media(max-width:840px){
 .toast{pointer-events:none!important;left:12px!important;right:12px!important;top:68px!important;bottom:auto!important;padding:9px 13px!important;max-width:none!important;max-height:64px;overflow:hidden;font-size:10px!important;z-index:90!important;text-align:center}
}
