/* Thumb controls and one status stack, shared by portrait and landscape. */
.mobile-toolbar,.mobile-joystick,.mobile-menu-backdrop,.mobile-credit,.mobile-only{display:none}
.mobile-status{display:contents}
body.mobile-ui{--mobile-left:max(12px,env(safe-area-inset-left));--mobile-right:max(12px,env(safe-area-inset-right));--mobile-top:max(10px,env(safe-area-inset-top));--mobile-bottom:max(16px,env(safe-area-inset-bottom));overscroll-behavior:none}
body.mobile-ui #world{touch-action:none}
body.mobile-ui .touch-game,body.mobile-ui .game-controls,body.mobile-ui .first-tour,body.mobile-ui .game-footer,body.mobile-ui #interactHint{display:none}
body.mobile-ui button,body.mobile-ui .mobile-credit{min-height:44px;touch-action:manipulation}
body.mobile-ui .game-header{inset:var(--mobile-top) var(--mobile-right) auto var(--mobile-left);height:52px;z-index:12;align-items:flex-start}
body.mobile-ui .game-brand h1{margin:0}body.mobile-ui .game-logo{width:54px;height:54px}body.mobile-ui .game-brand h1>span{display:none}
body.mobile-ui .game-brand .game-author{margin-top:1px;font-size:10px;letter-spacing:0}
body.mobile-ui .mobile-toolbar{display:flex;gap:8px;pointer-events:auto}
.mobile-toolbar button{min-width:76px;padding:10px 13px;font:700 13px Barlow,Arial,sans-serif;background:#202923ed;border:1px solid #e9e1cb75;border-radius:4px;color:#f6efd9;box-shadow:0 2px 8px #0003}
.mobile-toolbar #mobileMenuBtn[aria-expanded=true]{background:#e8c583;color:#202623}
body.mobile-ui .game-tools{display:none;position:absolute;top:58px;right:0;max-width:none;width:min(340px,calc(100vw - var(--mobile-left) - var(--mobile-right)));max-height:calc(100dvh - var(--mobile-top) - var(--mobile-bottom) - 72px);overflow:auto;overscroll-behavior:contain;grid-template-columns:1fr 1fr;gap:8px;padding:12px;background:#1b241ff5;border:1px solid #e8c58370;border-radius:5px;box-shadow:0 12px 35px #0006;pointer-events:auto}
body.mobile-ui.mobile-menu-open .game-tools{display:grid}
body.mobile-ui .game-tools button,body.mobile-ui .game-tools .mobile-credit{display:flex;align-items:center;justify-content:center;margin:0;min-height:46px;padding:9px 7px;border:1px solid #f2ead749;border-radius:3px;font:600 13px Barlow,Arial,sans-serif;background:#344036;color:#f5ecd7;text-decoration:none;text-align:center}
body.mobile-ui .game-tools .mobile-credit{color:#f2d19a;font-size:12px}
body.mobile-ui .game-tools #zonesBtn{display:none}
body.mobile-ui .game-tools #fullscreenBtn,body.mobile-ui .game-tools #helpBtn{font-size:0}
body.mobile-ui #fullscreenBtn::after{content:'Schermo intero';font:600 13px Barlow,Arial,sans-serif}
body.mobile-ui #helpBtn::after{content:'Comandi';font:600 13px Barlow,Arial,sans-serif}
body.mobile-ui .mobile-menu-backdrop:not([hidden]){display:block;position:absolute;inset:0;width:100%;height:100%;z-index:11;background:#0b130e85;border:0;border-radius:0}
body.mobile-ui .mobile-status{position:absolute;top:calc(var(--mobile-top) + 78px);left:var(--mobile-left);right:var(--mobile-right);z-index:4;display:flex;flex-direction:column;gap:7px;max-height:calc(100dvh - var(--mobile-top) - var(--mobile-bottom) - 386px);overflow:auto;overscroll-behavior:contain;pointer-events:none;scrollbar-width:thin}
body.mobile-ui .mobile-status>*{flex-shrink:0;pointer-events:auto;position:static;inset:auto;transform:none;width:100%;max-width:none;min-width:0;margin:0;box-sizing:border-box}
body.mobile-ui .mobile-status .location-badge{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:4px 7px;min-height:26px;padding:0 2px;white-space:normal;font-size:13px;line-height:1.3;pointer-events:none}
body.mobile-ui .location-badge small{margin-left:0;font-size:10px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.mobile-ui #missionPanel{display:none}
body.mobile-ui.mission-active #missionPanel{display:block;padding:8px 10px;background:#1d281ee8;border-left:3px solid #e8c583}
body.mobile-ui .mission-panel .mission-top>b{font-size:10px}body.mobile-ui .mission-panel .mission-top>strong{font-size:23px}body.mobile-ui .mission-panel p{font-size:12px;margin:4px 0}body.mobile-ui .mission-panel small{display:none}
body.mobile-ui .mission-panel .mission-actions{display:flex;margin-top:6px;gap:8px}body.mobile-ui .mission-actions button{font-size:12px;min-height:44px}body.mobile-ui .mission-actions button:last-child:not(:first-child){min-width:44px}
body.mobile-ui .mobile-status .route-notice:not([hidden]){display:block;white-space:normal;font:600 12px/1.3 Barlow,Arial,sans-serif;padding:7px 9px}
body.mobile-ui.mission-active #routeNotice{display:none}
body.mobile-ui .wanted-panel{padding:7px 10px;border-right-width:3px;background:#1a252ce8}body.mobile-ui .wanted-top{margin:0 0 3px}body.mobile-ui .wanted-stars{font-size:20px;letter-spacing:3px}body.mobile-ui .wanted-top button{font:600 11px Barlow,Arial,sans-serif;min-width:72px;min-height:44px}body.mobile-ui .wanted-panel>b{font:700 11px/1.3 Barlow,Arial,sans-serif}body.mobile-ui .wanted-panel>#wantedHint{display:none}body.mobile-ui .escape-meter{margin-top:6px}body.mobile-ui .wanted-panel>.roadblock-notice:not([hidden]){display:block;font:600 11px/1.3 Barlow,Arial,sans-serif;padding-top:4px;margin-top:4px}
body.mobile-ui .party-banner:not([hidden]){display:flex;justify-content:space-between;gap:8px;white-space:normal;padding:6px 9px;font:600 10px Barlow,Arial,sans-serif}body.mobile-ui .party-banner b{font-size:8px}body.mobile-ui .party-banner button{min-width:80px;min-height:44px;font-size:12px}
body.mobile-ui .mode-panel{left:auto;right:var(--mobile-right);bottom:var(--mobile-bottom);top:auto;width:184px;max-height:calc(100dvh - var(--mobile-top) - var(--mobile-bottom) - 72px);overflow:auto;overscroll-behavior:contain;z-index:5;padding:9px;background:linear-gradient(0deg,#18241fef,#18241fc9);border:1px solid #e9e1cb42;border-radius:5px;scrollbar-width:thin}
body.mobile-ui .mode-kicker,body.mobile-ui .mode-line,body.mobile-ui .mode-detail,body.mobile-ui .crowd-status{display:none}
body.mobile-ui .mode-panel .crowd-status{display:none}
body.mobile-ui .mode-value{margin:0 0 6px;gap:5px;align-items:center}body.mobile-ui .mode-value b{font-size:24px;line-height:1}body.mobile-ui .mode-value>span{font:600 9px Barlow,Arial,sans-serif}
body.mobile-ui .health-status{font-size:10px;margin:3px 0 6px}
body.mobile-ui .action-button{min-height:44px;font-size:12px;line-height:1.25;justify-content:center;text-align:center;padding:7px;margin:5px 0 7px}body.mobile-ui .action-button kbd,body.mobile-ui .action-button>b,body.mobile-ui .punch-button kbd{display:none}
body.mobile-ui .weapon-controls{margin:5px 0}body.mobile-ui .weapon-controls>small{font-size:8px;margin-bottom:3px}body.mobile-ui .weapon-controls button{min-height:44px;font-size:11px}
body.mobile-ui .defense-controls{margin:5px 0}body.mobile-ui .defense-controls>small{display:none}body.mobile-ui .defense-meter{margin:4px 0}body.mobile-ui .defense-buttons{gap:6px}body.mobile-ui .defense-buttons button{min-height:44px;font-size:0;padding:5px;touch-action:none}body.mobile-ui #guardBtn::after{content:'Para';font:600 12px Barlow,Arial,sans-serif}body.mobile-ui #dodgeBtn::after{content:'Schiva';font:600 12px Barlow,Arial,sans-serif}
body.mobile-ui .attack-buttons{gap:6px;margin-top:6px}body.mobile-ui .attack-buttons .punch-button{min-height:48px;font-size:12px;padding:6px;justify-content:center;text-align:center}
body.mobile-ui .npc-defense-notice,body.mobile-ui .combo-notice{font-size:10px;margin:4px 0}body.mobile-ui .recovery-controls{padding:6px;margin:4px 0}body.mobile-ui .recovery-controls button{font-size:13px}
body.mobile-ui .drive-extras>small,body.mobile-ui .rpm-line{display:none}body.mobile-ui .boost-meter{margin:5px 0 7px}body.mobile-ui .drive-actions{display:grid;grid-template-columns:1fr 1fr 1fr;gap:5px}body.mobile-ui .drive-actions button,body.mobile-ui .drive-actions button:first-child{grid-column:auto;min-height:48px;font-size:11px;padding:5px 2px;touch-action:none}body.mobile-ui .drive-actions button small,body.mobile-ui .drive-actions button:first-child b{display:none}body.mobile-ui #boostLabel{font-size:0}body.mobile-ui #boostLabel::after{content:'Turbo';font:700 11px Barlow,Arial,sans-serif}
body.mobile-ui .local-map{left:var(--mobile-left);bottom:calc(var(--mobile-bottom) + 146px);top:auto;width:108px;z-index:3;border-width:2px;border-radius:4px}body.mobile-ui .local-map>div{padding:0 4px;font-size:8px;letter-spacing:0}body.mobile-ui .local-map button{min-width:44px;min-height:44px;font-size:20px;padding:0}body.mobile-ui #mini{height:58px}body.mobile-ui .local-map>small{display:none}
body.mobile-ui .mobile-joystick{display:block;position:absolute;left:var(--mobile-left);bottom:var(--mobile-bottom);width:120px;z-index:6;user-select:none;-webkit-user-select:none;touch-action:none;text-align:center}
.joystick-pad{width:120px;height:120px;position:relative;border-radius:50%;border:2px solid #eee5ce82;background:radial-gradient(circle,#22352e85 0 40%,#15271f9e 41% 100%);box-shadow:0 3px 15px #0003;touch-action:none;user-select:none;-webkit-user-select:none}
.joystick-cross{position:absolute;inset:12px;border-radius:50%;border:1px solid #f5ecd72b;pointer-events:none}.joystick-cross::before,.joystick-cross::after{content:'';position:absolute;background:#f5ecd742;left:50%;top:50%;transform:translate(-50%,-50%)}.joystick-cross::before{height:1px;width:100%}.joystick-cross::after{width:1px;height:100%}
.joystick-knob{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:46px;height:46px;border:2px solid #e8c583b3;border-radius:50%;background:#d9bf88e6;box-shadow:0 2px 8px #0005;pointer-events:none}.joystick-pad.active{border-color:#e8c583}.joystick-pad.active .joystick-knob{background:#f5d68f}
.mobile-joystick>small{display:block;font:700 9px/1.3 Barlow,Arial,sans-serif;color:#fbefd0;text-shadow:0 1px 3px #000;margin-top:5px;white-space:nowrap}.joystick-drive-label{display:none}.driving-mode .joystick-foot-label{display:none}.driving-mode .joystick-drive-label{display:inline}
body.mobile-ui .mobile-status>#toast{position:static;inset:auto;transform:none;display:none;width:100%;max-width:none;margin:0;padding:8px 10px;background:#1d2a23ed;border-left:2px solid #e8c583;border-radius:0;opacity:1;transition:none;font:12px/1.35 Barlow,Arial,sans-serif;pointer-events:none}
body.mobile-ui .mobile-status>#toast.show{display:block}
body.mobile-ui #fireNotice{top:calc(var(--mobile-top) + 64px);bottom:auto;left:50%;max-width:calc(100vw - 28px);font-size:12px;z-index:10}
body.mobile-ui dialog{max-height:calc(100dvh - var(--mobile-top) - var(--mobile-bottom));overscroll-behavior:contain;scroll-padding:16px}
body.mobile-ui dialog .close{min-height:44px;min-width:64px;font-size:12px}
body.mobile-ui dialog>.close{position:sticky;top:0;z-index:2}
body.mobile-ui #mapDialog{width:calc(100vw - var(--mobile-left) - var(--mobile-right));height:calc(100dvh - var(--mobile-top) - var(--mobile-bottom));padding:14px}
body.mobile-ui #mapDialog .full-map-header{gap:8px;position:sticky;top:0;z-index:2;background:#e6dfcf}body.mobile-ui #mapDialog h2{font-size:26px}body.mobile-ui #mapDialog .close{flex-shrink:0;padding:8px}
body.mobile-ui .destination-picker{max-height:230px;margin-top:10px;overscroll-behavior:contain;scrollbar-width:thin}
body.mobile-ui .destination-card{grid-template-columns:1fr 1fr 1fr;gap:6px;padding:9px 0}body.mobile-ui .destination-card b{grid-column:1/-1;grid-row:1;font-size:14px}body.mobile-ui .destination-card small{display:none}body.mobile-ui .destination-card button{grid-row:2;min-height:44px;font-size:11px;padding:6px 4px}body.mobile-ui .destination-card button:nth-of-type(1){grid-column:1}body.mobile-ui .destination-card button:nth-of-type(2){grid-column:2}body.mobile-ui .destination-card button:nth-of-type(3){grid-column:3}
body.mobile-ui #mapDialog canvas{height:calc(100% - 370px);min-height:130px}body.mobile-ui #mapDialog>p{font-size:11px}body.mobile-ui #mapLegend{font-size:10px;max-height:70px}
@media(max-width:360px){body.mobile-ui .mode-panel{width:174px}body.mobile-ui .mobile-joystick,body.mobile-ui .joystick-pad{width:108px}body.mobile-ui .joystick-pad{height:108px}body.mobile-ui .local-map{width:100px;bottom:calc(var(--mobile-bottom) + 134px)}}
@media(orientation:landscape){
 body.mobile-ui .game-logo{width:46px;height:46px}body.mobile-ui .game-header{height:46px}
 body.mobile-ui .mobile-status{left:calc(var(--mobile-left) + 130px);right:calc(var(--mobile-right) + 204px);top:calc(var(--mobile-top) + 70px);max-height:calc(100dvh - var(--mobile-top) - var(--mobile-bottom) - 102px)}
 body.mobile-ui .mode-panel{width:190px;padding:8px}body.mobile-ui .mode-value b{font-size:22px}body.mobile-ui .mode-value{margin-bottom:3px}body.mobile-ui .action-button{margin:4px 0}body.mobile-ui .weapon-controls>small{display:none}body.mobile-ui .weapon-controls{margin:4px 0}body.mobile-ui .health-status{margin:3px 0 5px}body.mobile-ui .attack-buttons .punch-button{min-height:44px}
 body.mobile-ui .local-map{top:calc(var(--mobile-top) + 70px);bottom:auto;width:112px}body.mobile-ui #mini{height:54px}body.mobile-ui .local-map>div{height:44px}
 body.mobile-ui .mobile-joystick,body.mobile-ui .joystick-pad{width:112px}body.mobile-ui .joystick-pad{height:112px}body.mobile-ui .mobile-joystick>small{font-size:9px}
 body.mobile-ui #mapDialog{padding:12px 16px}body.mobile-ui #mapDialog h2{font-size:24px}body.mobile-ui .destination-picker{max-height:142px}body.mobile-ui .destination-card{grid-template-columns:minmax(110px,1fr) repeat(3,90px);gap:6px;padding:6px 0}body.mobile-ui .destination-card b{grid-column:1;grid-row:1;font-size:13px}body.mobile-ui .destination-card button{grid-row:1}body.mobile-ui .destination-card button:nth-of-type(1){grid-column:2}body.mobile-ui .destination-card button:nth-of-type(2){grid-column:3}body.mobile-ui .destination-card button:nth-of-type(3){grid-column:4}body.mobile-ui #mapDialog canvas{height:110px;min-height:110px}
}
