.mobile-hud,.mobile-actions,.mobile-notice,.mobile-menu-tabs,.mobile-help,.mobile-nitro { display:none; }
@media (max-width:1000px) {
  :root { --mobile-ink:#161320; --mobile-panel:#231d32; --mobile-line:#504360; --mobile-orange:#ffc06a; --dock-height:158px; }
  #gameContainer { container-type:size; }
  .legacy-hud,#combatHud,#journeyHud,#waveHud,#journeyHint { display:none!important; }
  .mobile-hud { display:block; position:absolute; z-index:16; top:8px; left:10px; right:10px; pointer-events:none; font-family:'Inter',sans-serif; }
  .mobile-status { display:flex; align-items:center; gap:12px; padding:8px 8px 8px 12px; background:#161320ed; border:1px solid var(--mobile-line); border-radius:16px; }
  .mobile-health { flex:1; min-width:0; }
  .mobile-health>span { display:flex; justify-content:space-between; font-size:11px; color:#e5ceda; margin-bottom:6px; }
  .mobile-health b { color:white; font-size:12px; }
  .mobile-meter { height:5px; border-radius:5px; background:#514255; overflow:hidden; }
  .mobile-meter i { display:block; height:100%; background:#ff758d; width:100%; }
  .mobile-score { min-width:65px; text-align:right; }
  .mobile-score span { font-size:10px; color:#c2b8cf; display:block; }
  .mobile-score b { font-family:'Chakra Petch',sans-serif; font-size:19px; color:#ffd395; }
  #mPause { pointer-events:auto; width:48px; height:48px; flex:none; background:#3a2d4c; border:1px solid #6d5a82; border-radius:12px; font-size:24px; }
  .mobile-mission { margin:6px 4px 0; padding:7px 10px; background:#161320db; border-radius:10px; display:flex; flex-direction:column; gap:2px; }
  .mobile-mission b { font-size:12px; color:#ffcf8c; }
  .mobile-mission span { font-size:11px; color:#e6e0ee; }
  .mobile-equipment { display:flex; justify-content:space-between; gap:8px; padding:6px 7px; font-size:10px; color:#fff; text-shadow:0 1px 3px black,0 0 5px black; }
  .mobile-equipment>span:first-child { display:flex; flex-direction:column; }
  .mobile-equipment b { font-size:12px; }
  .mobile-actions { display:flex; gap:8px; align-items:center; position:absolute; bottom:calc(var(--dock-height) + 12px); left:10px; right:10px; z-index:17; font-family:'Inter',sans-serif; }
  .mobile-destination { flex:1; min-width:0; padding:6px 8px; background:#161320dc; border-radius:10px; }
  .mobile-destination b,.mobile-destination span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .mobile-destination b { font-size:12px; color:#ffd395; }.mobile-destination span { font-size:11px; color:#ded4ec; margin-top:3px; }
  .mobile-actions button { height:48px; padding:0 12px; border:1px solid #736184; border-radius:12px; background:#292035ef; font-size:12px; font-weight:700; }
  #mInteract { background:#ffbf69; color:#26192c; border-color:#ffdaaa; }
  #touchControls { display:grid!important; grid-template-columns:repeat(2,58px) minmax(8px,1fr) repeat(2,58px); grid-template-rows:52px 66px 18px; gap:8px; position:absolute; width:auto; height:var(--dock-height); left:10px; right:10px; bottom:8px; top:auto; transform:none; z-index:17; padding:8px 0 0; opacity:1; pointer-events:none; background:linear-gradient(transparent,#120e1cd9); }
  #touchControls button { pointer-events:auto; touch-action:none; margin:0; padding:0; width:100%; min-width:0; height:100%; min-height:48px; font-family:'Inter',sans-serif; font-size:13px; font-weight:800; border-radius:16px; background:#262031e8; border:1px solid #8e789d; box-shadow:0 4px 0 #0c0911, inset 0 1px 0 #ffffff1c; backdrop-filter:none; }
  #btnTouchLeft { grid-column:1; grid-row:2; font-size:25px!important; }
  #btnTouchRight { grid-column:2; grid-row:2; font-size:25px!important; }
  #btnTouchDrift { grid-column:1; grid-row:1; color:#dfc0ff; }
  #btnTouchNitro { grid-column:2; grid-row:1; color:#ffce8a; }
  #btnTouchFire { grid-column:4; grid-row:1; color:#ffca9b; }
  #btnTouchBrake { grid-column:4; grid-row:2; color:#e3d8ee; }
  #touchControls #btnTouchGas { grid-column:5; grid-row:1 / 3; color:#211827; background:#ffbd68; border-color:#ffe0b5; font-size:20px; }
  #touchControls button.active-press,#touchControls button:active { background:#655073; border-color:#fff; transform:translateY(3px); box-shadow:0 1px 0 #0c0911; }
  .mobile-nitro { display:flex; grid-row:3; grid-column:1 / 3; gap:6px; align-items:center; font-size:9px; }
  .mobile-nitro>span { white-space:nowrap; }.mobile-nitro .mobile-meter { flex:1; height:4px; }.mobile-nitro i { background:#ffbd68; }
  .mobile-notice { display:none; position:absolute; top:162px; left:24px; right:24px; z-index:18; background:#221b31ee; border:1px solid #80658d; border-radius:10px; padding:8px 12px; font:12px/1.5 'Inter',sans-serif; pointer-events:none; text-align:center; }
  .mobile-notice.visible { display:block; }
  #comboContainer { top:190px; left:50%; width:180px; } #comboBadge { font-size:27px; } #comboSubText { font-size:10px; }
  #shakeAlertBanner { top:42%; } #shakeAlertBanner>div:first-child { font-size:22px; } #shakeAlertBanner>div:last-child { font-size:11px; }
  .mobile-menu-open .mobile-hud,.mobile-menu-open .mobile-actions,.mobile-menu-open .mobile-notice,.mobile-menu-open #touchControls { visibility:hidden; }
  #menuModal { padding:0; overflow:hidden; align-items:stretch; backdrop-filter:none; background:#120e1c; }
  #menuModal>.mobile-menu-card { display:flex; flex-direction:column; height:100%; max-height:100%; width:100%; max-width:100%; border:0; border-radius:0; padding:16px 16px 0; margin:0; overflow:hidden; box-shadow:none; background:radial-gradient(ellipse at 90% 0%,#3b2652 0%,#191323 55%); }
  .mobile-menu-header { flex:none; padding-bottom:12px!important; gap:6px!important; }
  .mobile-menu-header>div:first-child>div { display:none; }
  #modalTitle { font-family:'Chakra Petch',sans-serif; font-size:30px; font-weight:700; line-height:1.1; letter-spacing:-1px; text-shadow:none; color:#ffd094; }
  .mobile-menu-header>div:last-child { flex-direction:row; align-items:center; justify-content:space-between; gap:6px; }
  .mobile-menu-header>div:last-child>span:first-child { display:none; }
  .mobile-menu-header>div:last-child>span { font-size:11px; font-family:'Inter',sans-serif; }
  .mobile-menu-tabs { display:flex; flex:none; gap:6px; padding:10px 0 12px; }
  .mobile-menu-tabs button { flex:1; min-width:0; height:48px; font:600 12px 'Inter',sans-serif; border-radius:12px; background:#292135; border:1px solid #50415f; color:#d9cee5; }
  .mobile-menu-tabs button[aria-pressed=true] { background:#ffbf69; border-color:#ffbf69; color:#281a30; }
  .mobile-menu-panel { display:none!important; margin:0!important; overflow-y:auto; overscroll-behavior:contain; flex:1; min-height:0; scrollbar-width:thin; padding-bottom:16px; }
  [data-mobile-tab=car] [data-panel=car],[data-mobile-tab=map] [data-panel=map],[data-mobile-tab=gear] [data-panel=gear],[data-mobile-tab=help] [data-panel=help] { display:block!important; }
  .mobile-menu-tabs:has(~ [data-panel]) { align-items:center; }
  .mobile-menu-card[data-paused=true] .mobile-menu-tabs button[data-tab=car],.mobile-menu-card[data-paused=true] .mobile-menu-tabs button[data-tab=map] { display:none; }
  #carSelection>div:first-child,#mapSelection>div:first-child { font:600 12px 'Inter',sans-serif; text-transform:none; letter-spacing:0; }
  #carSelection>div:first-child>span:last-child,#mapSelection>div:first-child>span:last-child { font-size:10px; color:#bcaaca; }
  #carSelection>div:nth-child(2) { display:grid; grid-template-columns:1fr; gap:10px; }
  #carSelection .car-card { padding:12px; border-radius:16px; background:#241c32; min-height:126px; }
  #carSelection .car-card>div:nth-child(2) { float:right; width:82px; height:46px; margin:0 0 6px 10px; background:#15101e; }
  #carSelection .car-card p { font:12px/1.5 'Inter',sans-serif; }
  #carSelection .car-card>div:last-child { font:600 10px/1.5 'Inter',sans-serif; clear:both; }
  #carSelection .car-card .font-comic { font-family:'Chakra Petch',sans-serif; font-size:18px; letter-spacing:0; }
  #mapSelection>div:nth-child(2) { grid-template-columns:1fr 1fr; gap:10px; }
  #mapSelection .map-card { min-height:145px; padding:14px 12px; border-radius:16px; box-shadow:none; }
  #mapSelection .font-comic { font:700 16px/1.4 'Chakra Petch',sans-serif; letter-spacing:0; }
  #mapSelection p { font:12px/1.6 'Inter',sans-serif; margin-top:8px; }
  #mobileArmoryPanel { border:0; background:transparent; padding:0 0 16px; }
  #mobileArmoryPanel .combat-note { font-size:12px; }
  #mobileArmoryPanel button,#mobileArmoryPanel select { min-height:48px; }
  #mobileArmoryPanel .arsenal-grid { gap:10px; grid-template-columns:1fr 1fr; }
  #mobileArmoryPanel .weapon-card { padding:12px; min-height:150px; } #mobileArmoryPanel .weapon-card small { font-size:11px; }
  #mobileArmoryPanel .upgrade-row { display:grid; grid-template-columns:1fr; }
  .mobile-help { color:#ded4e9; font:14px/1.65 'Inter',sans-serif; }
  .mobile-help h2 { font-size:22px; color:#ffcf91; margin-bottom:14px; }.mobile-help h3 { font-size:17px; margin:20px 0 10px; color:white; }.mobile-help p { margin-bottom:14px; }
  .mobile-help button { min-height:48px; padding:12px; border-radius:12px; border:1px solid #675275; margin:4px 8px 0 0; background:#30243f; }
  #controlsGuide { display:none!important; }
  #menuModal .menu-actions { flex:none; position:static; margin:0; padding:12px 0 max(12px,env(safe-area-inset-bottom)); background:#191323; border-top:1px solid #584363; }
  .menu-actions>div:first-child { display:none; } .menu-actions>div:last-child { width:100%; gap:10px; display:flex; }
  #btnStartGame,#btnResumeGame { min-height:54px; padding:12px; font:700 16px/1.4 'Inter',sans-serif; letter-spacing:0; border-radius:14px; text-shadow:none; box-shadow:none; }
  #btnStartGame { flex:1; color:#25192e; background:#ffbf69; }
  #btnResumeGame:not(.hidden) { flex:2; color:#25192e; background:#ffbf69; }
  [data-paused=true] #btnStartGame { flex:1; font-size:13px; color:#e0d0e9; background:#37283f; }
  #gameOverModal { overflow-y:auto; padding:16px; } #gameOverModal .font-comic { font-family:'Chakra Petch',sans-serif; letter-spacing:0; }
  #gameOverModal button { min-height:48px; font:700 15px 'Inter',sans-serif; }
}
@media (max-width:1000px) and (orientation:landscape) and (max-height:540px) {
  :root { --dock-height:134px; }
  .mobile-hud { left:calc(50% - 170px); right:auto; width:340px; top:6px; }
  .mobile-status { padding:4px 5px 4px 10px; border-radius:12px; gap:10px; } #mPause { height:48px; }
  .mobile-mission { padding:4px 8px; margin-top:3px; }.mobile-mission span { font-size:10px; }
  .mobile-equipment { display:none; }
  #touchControls { grid-template-columns:repeat(2,60px) 1fr repeat(2,60px); grid-template-rows:48px 56px 14px; gap:8px; bottom:8px; left:14px; right:14px; }
  .mobile-actions { left:calc(50% - 170px); right:auto; width:340px; bottom:12px; gap:8px; }
  .mobile-actions button { font-size:11px; padding:0 10px; }.mobile-destination b { font-size:11px; }
  .mobile-notice { top:112px; left:calc(50% - 180px); right:auto; width:360px; padding:4px 8px; font-size:11px; }
  #comboContainer { top:150px; left:50%; } #comboBadge { font-size:22px; }
  #menuModal>.mobile-menu-card { padding:10px 16px 0; } .mobile-menu-header { flex-direction:row; padding-bottom:6px!important; align-items:center; }
  #modalTitle { font-size:24px; }.mobile-menu-header>div:last-child { gap:14px; }
  .mobile-menu-tabs { padding:6px 0; }.mobile-menu-tabs button { height:44px; }
  #carSelection>div:nth-child(2) { grid-template-columns:repeat(3,1fr); } #carSelection .car-card>div:nth-child(2) { float:none; width:100%; margin:5px 0; }
  #mapSelection>div:nth-child(2) { grid-template-columns:repeat(4,1fr); }
  #mobileArmoryPanel .arsenal-grid { grid-template-columns:repeat(3,1fr); }
  #menuModal .menu-actions { padding:6px 0; } #btnStartGame,#btnResumeGame { min-height:48px; }
}
@media (max-width:680px) and (orientation:landscape) { .mobile-hud { width:280px; left:calc(50% - 140px); }.mobile-actions { width:280px; left:calc(50% - 140px); }.mobile-destination { display:none; }.mobile-actions button { flex:1; } }
