#mnav,.msheet{display:none}
body.mobile{--nav-h:58px;font-size:14px}
body.mobile #top{height:auto;min-height:44px;flex-wrap:wrap;row-gap:4px;column-gap:10px;padding:calc(4px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) 5px calc(8px + env(safe-area-inset-left))}
body.mobile #top .brand,body.mobile #top .sp,body.mobile .wxbtn,body.mobile #paceLabel,body.mobile #btnZones,body.mobile #btnAim,body.mobile #btnSpoil,body.mobile #btnSave,body.mobile #btnSound,body.mobile #btnMode,body.mobile #btnHelp,body.mobile #btnMore,body.mobile #top .kv:has(#hdCiv),body.mobile #top .kv:has(#hdEn){display:none!important}
body.mobile #top .clock{font-size:1.35em;min-width:0}
body.mobile #top .kv span{font-size:10px}
body.mobile #top .kv b{font-size:13px}
body.mobile #btnAlarm{margin-left:auto;min-height:34px;padding:.3em .7em;font-size:12px}
body.mobile #speedBox{order:20;flex:1 1 100%;justify-content:center;flex-wrap:wrap;gap:6px}
body.mobile #speedBox:empty{display:none}
body.mobile #speedBox .seg button{min-width:44px;min-height:36px;font-size:13px}
body.mobile #speedBox .btn{min-height:36px}
body.mobile #speedBox .tctl{flex-basis:100%;text-align:center;font-size:10px}
body.mobile #speedBox .btn.pri{flex:1;max-width:420px;min-height:40px;font-size:15px}
body.mobile #fxGrain{display:none}

body.mobile #mnav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:14;height:calc(var(--nav-h) + env(safe-area-inset-bottom));padding:0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:linear-gradient(#0b131bf2,#070c11fa);border-top:1px solid var(--bd2)}
body.mobile #mnav[hidden]{display:none}
#mnav button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:none;border:0;color:var(--mu);font-size:11px;position:relative;min-width:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
#mnav button .ic{font-size:19px;line-height:1}
#mnav button.on{color:var(--ac)}
#mnav button.on::before{content:'';position:absolute;top:0;left:22%;right:22%;height:2px;background:var(--ac);border-radius:0 0 2px 2px}
#mnav i{position:absolute;top:6px;left:calc(50% + 8px);background:var(--rd);color:#fff;font-style:normal;font-size:10px;font-weight:700;border-radius:9px;padding:0 5px;min-width:16px;text-align:center}

body.mobile .panel,body.mobile .msheet{display:flex;flex-direction:column;position:fixed;left:0;right:0;width:auto;top:auto;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom));height:min(58dvh,calc(100dvh - var(--thx) - var(--nav-h) - 16px));border-radius:16px 16px 0 0;border:1px solid var(--bd2);border-bottom:0;background:rgba(9,15,21,.985);transform:translateY(calc(100% + var(--nav-h) + 20px));transition:transform .22s ease,height .2s ease;z-index:12;box-shadow:0 -10px 40px rgba(0,0,0,.6)}
body.mobile.sheet-full .panel,body.mobile.sheet-full .msheet{height:calc(100dvh - var(--thx) - var(--nav-h) - 4px)}
body.mobile[data-sheet="left"] #left,body.mobile[data-sheet="right"] #right,body.mobile[data-sheet="more"] #mMore{transform:none}
body.mobile .msheet[hidden]{display:none}
body.mobile .panel.col{transform:translateY(calc(100% + var(--nav-h) + 20px))}
body.mobile[data-sheet="left"] #left.col,body.mobile[data-sheet="right"] #right.col{transform:none}
body.mobile .colbtn{display:none}
body.mobile .sheet-grip{display:flex;justify-content:center;align-items:center;height:20px;flex:none;cursor:pointer;touch-action:none}
body.mobile .sheet-grip i{width:44px;height:5px;border-radius:3px;background:#3a4f5f}
body.mobile .tabs button{padding:.75em .2em;font-size:13px}
body.mobile .pc{padding:.6em .8em calc(.8em + env(safe-area-inset-bottom))}
body.mobile .btn{min-height:38px;padding:.5em .9em}
body.mobile .btn.sm{min-height:34px;padding:.4em .75em}
body.mobile .seg button{min-height:38px}
body.mobile .acts{gap:.5em}
body.mobile .fl{padding:.65em .4em}
body.mobile svg.shopic{height:60px}
body.mobile #mMore .acts .btn{flex:1 1 40%}

body.mobile #chatToggle{display:none}
body.mobile #chatPanel{left:0;right:0;width:auto;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + var(--chat-lift,0px));height:min(70dvh,calc(var(--chat-viewport,100dvh) - var(--thx) - var(--nav-h) - 8px));border-radius:16px 16px 0 0;border-bottom:0;font-size:14px;z-index:13}
body.mobile #chatInput{font-size:16px}
body.mobile.chat-open #left{bottom:calc(var(--nav-h) + env(safe-area-inset-bottom))}

body.mobile #threatbar{left:6px;right:6px;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 6px);justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;max-height:none;padding-bottom:2px;scrollbar-width:none;z-index:5}
body.mobile #threatbar::-webkit-scrollbar{display:none}
body.mobile[data-sheet="left"] #threatbar,body.mobile[data-sheet="right"] #threatbar,body.mobile[data-sheet="more"] #threatbar,body.mobile.chat-open #threatbar{display:none}
body.mobile .tch{font-size:12px;padding:.35em .6em}
body.mobile #hintbar{white-space:normal;max-width:calc(100vw - 20px);text-align:center;bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 50px);font-size:13px}
body.mobile #netbar{top:calc(var(--thx) + 4px);font-size:11px;padding:2px 8px;max-width:calc(100vw - 16px);overflow:hidden;text-overflow:ellipsis}
body.mobile #netbar .btn:not([data-a="players"]){display:none}
body.mobile[data-sheet="left"] #netbar,body.mobile[data-sheet="right"] #netbar,body.mobile[data-sheet="more"] #netbar,body.mobile.chat-open #netbar{display:none!important}
body.mobile #balbar{top:calc(var(--thx) + 28px)}
body.mobile #toast{top:calc(var(--thx) + 34px);max-width:94vw}
body.mobile #toast div{font-size:13px;padding:.5em .9em}
body.mobile #tip{display:none!important}
body.mobile #modal{padding:0;align-items:stretch}
body.mobile #modal .box{max-width:100%;width:100%;max-height:none;height:100%;border-radius:0;padding:calc(1em + env(safe-area-inset-top)) 1em calc(1.4em + env(safe-area-inset-bottom))}
body.mobile #modal h1{font-size:1.4em}
body.mobile #modal table{font-size:12px;display:block;overflow-x:auto}
body.mobile #modal .acts .btn{flex:1;min-height:44px}

@media (orientation:landscape){
  body.mobile{--nav-h:48px}
  body.mobile #mnav button{flex-direction:row;gap:6px;font-size:12px}
  body.mobile .panel,body.mobile .msheet{left:auto;right:env(safe-area-inset-right);width:min(430px,62vw);height:calc(100dvh - var(--thx) - var(--nav-h) - 6px);border-radius:14px 0 0 0;border-right:0}
  body.mobile #left{right:auto;left:env(safe-area-inset-left);border-radius:0 14px 0 0;border-left:0;border-right:1px solid var(--bd2)}
  body.mobile #chatPanel{right:auto;left:env(safe-area-inset-left);width:min(430px,62vw);height:calc(100dvh - var(--thx) - var(--nav-h) - 6px)}
  body.mobile .sheet-grip{display:none}
  body.mobile #netbar{display:none!important}
  body.mobile #speedBox .btn.pri{min-height:34px;font-size:14px}
}
body.mobile #modebar{bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px);max-width:calc(100vw - 16px);width:calc(100vw - 16px);z-index:15}
body.mobile #modebar .btn{flex:1;min-height:42px}
body.mobile #modebar .mb-t{flex-basis:100%;text-align:center}
body.mobile.in-mode #threatbar{display:none}
body.mobile.in-mode #hintbar{bottom:calc(var(--nav-h) + env(safe-area-inset-bottom) + 150px)}
