.mobile-hotbar-edit,.mobile-chat-tools,.mobile-monsters-details,.mobile-buff-line{display:none}
.mobile-chat-modal[hidden],.mobile-buff-dialog[hidden]{display:none!important}
body.r2-mobile-compact .mobile-hotbar-edit{display:block;min-height:36px;width:100%;margin:0 0 4px;background:#172333;color:#dbe5ef;border:1px solid #465668;border-radius:7px;font-size:12px}
body.r2-mobile-compact.mobile-hotbar-editing #locHotbar{outline:2px solid #d4b56d;outline-offset:1px}
body.r2-mobile-compact .mobile-chat-tools{display:flex;justify-content:flex-end;margin-bottom:4px;width:100%;order:0}
.mobile-chat-tools button{min-height:36px;padding:4px 12px;border:1px solid #475569;background:#172333;color:#e8dcc8;border-radius:7px}
.mobile-chat-modal{position:fixed;inset:0;z-index:2147483100;display:flex;align-items:stretch;padding:8px;box-sizing:border-box;background:#07101fee;max-height:100dvh}
body.r2-mobile-compact .mobile-chat-modal #historySection{width:100%;height:100%;display:flex!important;flex-direction:column;padding:8px;box-sizing:border-box;background:#111d2c;border:1px solid #475569;border-radius:12px}
body.r2-mobile-compact .mobile-chat-modal .loc-chat-head{order:1!important}
body.r2-mobile-compact .mobile-chat-modal .loc-chat-tabs{flex:none}
body.r2-mobile-compact .mobile-chat-modal .loc-chat-panel.is-active{order:2;display:flex!important;flex-direction:column;flex:1;min-height:0}
body.r2-mobile-compact .mobile-chat-modal .chat-window,body.r2-mobile-compact .mobile-chat-modal .loc-global-chat,body.r2-mobile-compact .mobile-chat-modal .loc-private-chat{height:100%!important;min-height:0!important;max-height:none!important;flex:1}
body.r2-mobile-compact .mobile-chat-modal .global-chat-messages{flex:1;min-height:0;max-height:none!important;overflow:auto}
body.r2-mobile-compact .mobile-chat-modal .global-chat-input{font-size:16px!important}
body.r2-mobile-compact .mobile-monsters-details{display:block;width:100%;border:1px solid #475569;border-radius:10px;background:#101b2b;color:#e8dcc8}
.mobile-monsters-details summary{padding:12px;min-height:44px;cursor:pointer}.mobile-monsters-details #monstersSidePanel{margin:0!important;border:0!important}
body.r2-mobile-compact .mobile-buff-line:not([hidden]){display:flex;grid-column:1;align-items:center;gap:4px;max-width:100%;margin-bottom:4px}
body.r2-mobile-compact .mobile-buff-line #locBuffBar{position:static!important;display:flex!important;flex-wrap:nowrap!important;flex:1;min-width:0;gap:3px!important;max-width:none!important;pointer-events:auto!important}
body.r2-mobile-compact .mobile-buff-line .loc-buff-icon{width:36px!important;height:36px!important;min-width:36px!important;cursor:pointer;pointer-events:auto!important}
body.r2-mobile-compact .mobile-buff-line .loc-buff-icon:nth-child(n+6){display:none!important}
.mobile-buff-line>button{min-height:36px;background:#172333;border:1px solid #475569;color:#e8dcc8;border-radius:6px;font-size:11px;padding:4px}
.mobile-buff-dialog{position:fixed;inset:0;background:#0009;display:grid;place-items:center;padding:12px;z-index:2147483101}.mobile-buff-dialog>section{width:min(370px,100%);max-height:85dvh;overflow:auto;background:#111d2c;border:1px solid #8c814b;border-radius:10px;padding:12px;color:#e8dcc8}.mobile-buff-dialog article{border-bottom:1px solid #475569;padding:10px 0}.mobile-buff-dialog p{margin:6px 0;color:#d6dfeb}.mobile-buff-dialog button{min-height:44px;padding:8px 15px;background:#263344;color:#fff;border:1px solid #64748b;border-radius:8px}
body.r2-mobile-compact .r2-item-cooldown>span{font-size:16px!important}
.mobile-availability{position:absolute;inset:auto 0 3px;z-index:5;background:#172554e8;color:#fff;font-size:10px;pointer-events:none;text-align:center}

body.r2-mobile-compact .mobile-buff-line{order:2;width:100%}
body.r2-mobile-compact .mobile-chat-modal .loc-chat-panels{display:flex!important;flex-direction:column;flex:1;min-height:0;order:2}
body.r2-mobile-compact .mobile-chat-modal .loc-chat-panel.is-active{height:100%;width:100%}
body.r2-mobile-compact .mobile-chat-modal .chat-window-overlay{font-size:14px!important;line-height:1.4}
body.r2-mobile-compact .mobile-chat-modal{padding-top:36px}
/* Expanded system history uses the same flexible frame as the other tabs. */
body.r2-mobile-compact .mobile-chat-modal #chatWindow{position:relative;overflow:hidden;background:#020817;border:1px solid #475569;border-radius:10px;box-sizing:border-box}
body.r2-mobile-compact .mobile-chat-modal #chatWindow .chat-window-bg{display:none!important}
body.r2-mobile-compact .mobile-chat-modal #chatWindowOverlay{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
body.r2-mobile-compact .mobile-chat-modal #historyList{position:absolute!important;inset:10px!important;width:auto!important;height:auto!important;margin:0!important;overflow:auto!important;font-size:14px!important;line-height:1.4!important;box-sizing:border-box}

/* All collapsed chat tabs keep one footprint under the hotbar. */
body.r2-mobile-compact #locMainPanel #historySection .loc-chat-panels{height:226px!important;min-height:226px!important;max-height:226px!important}
body.r2-mobile-compact #locMainPanel #historySection .loc-chat-panel.is-active{height:100%!important}
body.r2-mobile-compact #locMainPanel #historySection .chat-window,
body.r2-mobile-compact #locMainPanel #historySection .loc-global-chat,
body.r2-mobile-compact #locMainPanel #historySection .loc-private-chat{height:226px!important;min-height:226px!important;max-height:226px!important;box-sizing:border-box}
body.r2-mobile-compact #locMainPanel #chatWindow{position:relative;overflow:hidden;background:#020817;border:1px solid #475569;border-radius:10px}
body.r2-mobile-compact #locMainPanel #chatWindow .chat-window-bg{display:none!important}
body.r2-mobile-compact #locMainPanel #chatWindowOverlay{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
body.r2-mobile-compact #locMainPanel #historyList{position:absolute!important;inset:8px!important;width:auto!important;height:auto!important;margin:0!important;overflow:auto!important;box-sizing:border-box}
