.mobile-only{display:none}.mobile-sheet{display:contents}
body.mobile-layout{--nav-height:66px;--head-height:48px;--hud-height:42px;--safe-bottom:env(safe-area-inset-bottom,0px);--safe-top:env(safe-area-inset-top,0px);background:#121c22}
.mobile-layout .shell{width:100%;min-width:0;max-width:none;padding:0 0 var(--safe-bottom)}
.mobile-layout .topbar{height:calc(var(--head-height) + var(--safe-top));padding:calc(var(--safe-top) + 3px) max(12px,env(safe-area-inset-right)) 3px max(12px,env(safe-area-inset-left));margin:0;border-bottom:1px solid #6b6b51;background:linear-gradient(110deg,#213a3c,#18212a);position:relative;z-index:12}
.mobile-layout .topbar .eyebrow{display:none}.mobile-layout .topbar h1{font-size:18px;letter-spacing:0}.mobile-layout #logout{min-height:40px;padding:6px 10px;font-size:10px}.mobile-layout .connection{border:0;background:transparent;padding:4px;font-size:9px;max-width:74px}.mobile-layout .top-actions{gap:5px}
.mobile-layout .account{min-height:0;margin:20px 14px;display:block;border-radius:14px;overflow:hidden;background:linear-gradient(145deg,#294342,#1b2832);box-shadow:0 15px 40px #0005}.mobile-layout .account-art{display:none}.mobile-layout .account-form{padding:28px 22px;max-width:none}.mobile-layout .account-form h2{font-size:29px}.mobile-layout label{font-size:13px}.mobile-layout input{font-size:16px;min-height:46px}.mobile-layout .form-actions{display:grid;grid-template-columns:1fr 1fr}.mobile-layout .form-actions button{padding:13px 8px;min-height:48px}.mobile-layout .roster{display:block;margin:16px 12px;padding:22px;border-radius:12px}.mobile-layout .roster h2{font-size:24px}.mobile-layout .roster form{width:100%;margin-top:25px}.mobile-layout .characters{display:grid;grid-template-columns:1fr}.mobile-layout .characters button{padding:18px;min-height:72px;background:linear-gradient(110deg,#334f4b,#273742)}
.mobile-layout.in-realm{overflow:hidden;overscroll-behavior:none}.mobile-layout.in-realm .shell{padding:0;height:var(--mobile-height,100dvh)}.mobile-layout.in-realm footer{display:none}
.mobile-layout .game{display:flex;flex-direction:column;gap:0;min-width:0;min-height:0;width:100%;height:calc(var(--mobile-height,100dvh) - var(--head-height) - var(--safe-top) - var(--nav-height) - var(--safe-bottom));position:relative}
.mobile-layout .mobile-only{display:flex}.mobile-layout .mobile-vitals{height:var(--hud-height);flex:0 0 var(--hud-height);align-items:center;gap:8px;padding:5px 12px;background:#1e3032;border-bottom:1px solid #415853;color:#f0e4c5}.mobile-vitals>div:first-child{flex:1;min-width:0}.mobile-vitals strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 12px Georgia}.mobile-vitals>div:first-child>span{font-size:9px;color:#b9c9b6}.mobile-meter{position:relative;width:91px;height:23px;border:1px solid #526559;border-radius:5px;overflow:hidden;background:#131e25;flex-shrink:0}.mobile-meter>span{position:absolute;z-index:1;inset:0;display:grid;place-items:center;font-size:10px;font-weight:600;text-shadow:1px 1px #18252b}.mobile-meter>i{position:absolute;left:0;top:0;bottom:0;width:100%;transition:width .2s;background:linear-gradient(90deg,#7f4240,#bb6e55)}.mobile-meter.mana>i{background:linear-gradient(90deg,#365b77,#679eaa)}
.mobile-layout .viewport-column{width:100%;flex:1;min-height:0;display:flex;flex-direction:column}.mobile-layout .viewport-toolbar{display:none}.mobile-layout .world-wrap{flex:1;height:auto!important;min-height:0;max-height:none;resize:none;border:0;box-shadow:none;touch-action:none}.mobile-layout .world-wrap canvas#world{width:100%;height:100%;touch-action:none}.mobile-layout .world-label{top:10px;left:10px;max-width:calc(100% - 145px);gap:0;padding:7px 9px;border-color:#7d8b68;border-radius:5px;background:#16292de0;font-size:8px;min-height:44px;box-shadow:0 2px 5px #0004}.mobile-layout .world-label #coordinates{display:none}.mobile-layout .world-label #areaName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-layout .zoom-controls{top:8px;right:8px;bottom:auto;border-radius:6px;border-color:#60746a;letter-spacing:0}.mobile-layout .zoom-controls button{width:40px;height:36px;background:#1c3238}.mobile-layout .zoom-controls span{min-width:36px;font-size:9px}.mobile-layout .toast{bottom:140px;border-radius:9px;background:#153337f2;border-color:#99aa82;max-width:calc(100% - 24px);text-align:center;width:max-content;font-size:12px;z-index:11;padding:9px 12px}
.mobile-layout .joystick{position:absolute;left:max(16px,env(safe-area-inset-left));bottom:18px;width:116px;height:116px;border-radius:50%;border:2px solid #819a7a99;background:radial-gradient(circle,#203c42cc 0,#152b3299 62%,#6b826133 64%,#193138aa 69%);box-shadow:0 3px 15px #07151a55,inset 0 0 20px #0b1c2277;touch-action:none;user-select:none;-webkit-user-select:none;align-items:center;justify-content:center;z-index:8;outline-offset:3px}.joystick-thumb{position:absolute;left:50%;top:50%;width:49px;height:49px;border-radius:50%;transform:translate(-50%,-50%);background:radial-gradient(circle at 35% 28%,#a8b994,#738b78 65%,#3b5c62);border:2px solid #d0d1a5;box-shadow:0 4px 9px #09192088;pointer-events:none}.joystick.engaged{border-color:#d5cc95;background-color:#153435b0}.joy-axis{position:absolute;color:#bed4ac88;font-size:10px;pointer-events:none}.joy-up{top:8px}.joy-down{bottom:8px}.joy-left{left:8px}.joy-right{right:8px}.joy-label{position:absolute;bottom:-13px;font-size:7px;letter-spacing:.22em;color:#d4e0b6;pointer-events:none}
.mobile-layout .mobile-actions{position:absolute;right:max(16px,env(safe-area-inset-right));bottom:24px;align-items:flex-end;gap:9px;z-index:8}.mobile-actions button{border-radius:50%;width:65px;height:65px;background:radial-gradient(circle at 40% 20%,#596047ee,#263a37ef);border:2px solid #bdba82;color:#f6e5b0;box-shadow:0 4px 10px #10212788;touch-action:manipulation;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0}.mobile-actions button>span{font-size:24px;line-height:1.1}.mobile-actions button>small{font-size:8px;letter-spacing:.03em;margin-top:3px}.mobile-actions #mobileAttack{width:76px;height:76px;background:radial-gradient(circle at 35% 25%,#8d6948ee,#483b31ef);border-color:#e0bf88}.mobile-actions button:disabled{opacity:.5}.mobile-actions button:active:not(:disabled){transform:scale(.95)}
.mobile-layout .touch-pad{display:none;left:max(14px,env(safe-area-inset-left));bottom:14px;grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,44px);gap:3px;z-index:8}.mobile-layout[data-mobile-movement=buttons] .touch-pad{display:grid}.mobile-layout[data-mobile-movement=buttons] .joystick{display:none}.mobile-layout .touch-pad button{height:44px;border-radius:11px;border-color:#a0ae83;background:#1d393ee0;font-size:15px;touch-action:none}.touch-pad [data-dir=up]{grid-column:2;grid-row:1}.touch-pad [data-dir=left]{grid-column:1;grid-row:2}.touch-pad [data-dir=right]{grid-column:3;grid-row:2}.touch-pad [data-dir=down]{grid-column:2;grid-row:3}
.mobile-layout .mobile-navigation{position:fixed;left:0;right:0;bottom:0;height:calc(var(--nav-height) + var(--safe-bottom));padding:5px max(4px,env(safe-area-inset-right)) calc(5px + var(--safe-bottom)) max(4px,env(safe-area-inset-left));z-index:40;border-top:1px solid #75896b;background:linear-gradient(#243b3e,#14262e);display:grid;grid-template-columns:repeat(6,1fr);gap:2px;box-shadow:0 -5px 20px #10212555}.mobile-navigation button{position:relative;background:transparent;color:#c4cfb9;border:0;border-radius:8px;min-height:48px;padding:4px 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.mobile-navigation button>span{font-size:20px;line-height:1.1}.mobile-navigation small{font-size:8px;letter-spacing:.02em}.mobile-navigation button.selected{background:#a3b48820;color:#fff0b2;box-shadow:inset 0 2px #d8c88f}.mobile-navigation b{position:absolute;top:1px;right:14%;min-width:16px;border-radius:8px;background:#b76e50;color:#fff1da;font-size:9px;padding:1px 3px}
.mobile-layout .mobile-sheet-backdrop{position:fixed;inset:calc(var(--head-height) + var(--safe-top)) 0 calc(var(--nav-height) + var(--safe-bottom));z-index:28;background:#0612188f;touch-action:none}.mobile-layout .mobile-sheet{display:none;position:fixed;top:calc(var(--mobile-top,0px) + var(--head-height) + var(--safe-top) + 45px);bottom:calc(var(--nav-height) + var(--safe-bottom));left:max(0px,env(safe-area-inset-left));right:max(0px,env(safe-area-inset-right));z-index:30;background:linear-gradient(150deg,#2b4544,#182b35);border:1px solid #8b9a77;border-bottom:0;border-radius:18px 18px 0 0;box-shadow:0 -10px 30px #04171b88;overflow:hidden;flex-direction:column;max-height:calc(var(--mobile-height,100dvh) - 120px)}.mobile-layout.mobile-sheet-open .mobile-sheet{display:flex}.mobile-sheet-header{align-items:center;justify-content:space-between;padding:13px 16px 7px;gap:12px;flex-shrink:0}.mobile-sheet-kicker{font-size:7px;letter-spacing:.2em;color:#bbcaab}.mobile-sheet-header h2{font:600 22px Georgia;color:#f0dfb7;margin:4px 0}.mobile-sheet-header button{width:44px;height:44px;border-radius:50%;background:#173138;color:#e7dcc0;border:1px solid #6f8b77;font-size:27px;flex-shrink:0}.mobile-sheet-tabs{gap:5px;overflow-x:auto;flex-shrink:0;padding:3px 14px 10px;scrollbar-width:none}.mobile-sheet-tabs button{flex-shrink:0;border:1px solid #69816d;border-radius:20px;background:#173039;color:#d3dcc4;padding:8px 12px;min-height:36px;font-size:10px}.mobile-sheet-tabs button.selected{background:#b6c499;color:#203737;border-color:#d1d4ac}
.mobile-layout .sidebar{display:block;flex:1;min-height:0;width:100%;max-height:none;border:0;background:transparent;padding:0 14px 18px;overflow:auto;overscroll-behavior:contain}.mobile-layout .client-window{display:none;border:0;background:transparent;box-shadow:none;font-size:13px}.mobile-layout .client-window.mobile-selected:not([hidden]){display:block}.mobile-layout .client-window>summary{display:none}.mobile-layout .window-body{padding:4px 0 12px}.mobile-layout .sidebar p{font-size:13px;line-height:1.6;color:#d0d9c9}.mobile-layout .sidebar h2{font-size:22px}.mobile-layout .sidebar h3{font-size:16px;color:#e3d4ae}.mobile-layout .stats{font-size:13px;gap:12px}.mobile-layout .vitals{font-size:13px}.mobile-layout .bar{height:10px}.mobile-layout .panel-title{font-size:11px;letter-spacing:.07em;padding:7px 0}.mobile-layout .paperdoll{padding:12px;border-radius:13px;gap:10px;background:radial-gradient(ellipse,#48695a,#182d36 75%)}.mobile-layout .paperdoll canvas{width:120px;height:150px;flex-shrink:0}.mobile-layout .equipment{gap:5px}.mobile-layout .slot{min-height:59px;border-radius:6px}.mobile-layout .slot span{font-size:8px}.mobile-layout .slot .item-icon{width:35px;height:35px}.mobile-layout .inventory{grid-template-columns:repeat(4,minmax(0,1fr));max-height:none;gap:8px;padding:8px 0}.mobile-layout .bag-item{min-height:79px;border-radius:8px;padding:7px 4px}.mobile-layout .bag-item .item-icon{width:42px;height:42px}.mobile-layout .bag-item small{font-size:9px;white-space:normal;line-height:1.2}.mobile-layout .item-quantity{font-size:11px;right:5px;top:4px}
.mobile-layout .map-wrap{width:min(100%,320px);background:#13262d;border:1px solid #6b8770;border-radius:12px;padding:8px}.mobile-layout .map-wrap canvas{width:min(100%,38dvh);height:auto;aspect-ratio:1;margin:auto;max-height:none}.mobile-layout .mini-controls button{width:48px;height:44px;border-radius:8px;font-size:20px}.mobile-layout .mini-controls span{font-size:12px}.mobile-layout #questText,.mobile-layout #dialogueActions,.mobile-layout #equipmentCatalog{max-height:none;overflow:visible}.mobile-layout .quest-row{padding:12px 0}.mobile-layout .quest-row>summary{font-size:13px;min-height:35px}.mobile-layout .quest-row p{font-size:13px}.mobile-layout #dialogueActions{gap:8px;display:grid;grid-template-columns:1fr}.mobile-layout #dialogueActions button{font-size:13px;min-height:48px;border-radius:8px;padding:10px 14px;line-height:1.35;text-align:left;background:#375247;color:#f1e5c8;border-color:#829475}.mobile-layout #spells{gap:10px;display:grid;grid-template-columns:1fr 1fr}.mobile-layout #spells button{font-size:13px;min-height:58px;border-radius:10px;background:#344f65}.mobile-layout .target-card button{min-height:48px;font-size:13px;border-radius:8px}.mobile-layout .catalog-item{font-size:12px;line-height:1.4;padding:9px 0}.mobile-layout .catalog-item .item-icon{width:35px;height:35px}.mobile-layout .catalog-search{font-size:12px}.mobile-layout .catalog-search input{font-size:16px;min-height:46px;border-radius:8px}.mobile-layout .chat-head{font-size:11px}.mobile-layout .chat-head .eyebrow{font-size:8px;letter-spacing:.06em}.mobile-layout .chat-log{height:min(36vh,300px);font-size:13px;line-height:1.5;margin:15px 0}.mobile-layout .chat-line{padding:4px 0}.mobile-layout .chat form{position:sticky;bottom:0;gap:7px;background:#1c333b;padding:6px 0}.mobile-layout .chat input{font-size:16px;min-height:48px;border-radius:8px}.mobile-layout .chat button{font-size:13px;min-height:48px;padding:7px 14px;border-radius:8px}.mobile-layout #godConsole input{font-size:16px;min-height:46px}.mobile-layout #godConsole button{font-size:13px;min-height:44px;min-width:80px;border-radius:7px}.mobile-layout #godConsole p{max-height:none}
.mobile-window-menu{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mobile-window-menu button{min-height:91px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;border-radius:12px;border:1px solid #789275;background:linear-gradient(135deg,#3a5750,#243d45);color:#ecdfbb;font-size:12px}.mobile-window-menu button>span{font-size:25px;color:#d0d6a3}.mobile-menu-tip{margin:18px 5px 0!important;font-size:11px!important;color:#afc1b0!important}.movement-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.movement-options button{min-height:68px;border:1px solid #668575;background:#1b353d;border-radius:10px;color:#d2dec6;font-size:12px;line-height:1.5;padding:8px}.movement-options button[aria-pressed=true]{background:#b3c19a;color:#1d393c;border-color:#e1d6a6;box-shadow:0 0 0 2px #e1d6a622}.mobile-control-tip{border-left:2px solid #becc9e;padding-left:12px}
.mobile-layout.mobile-keyboard-open .mobile-navigation{display:none}.mobile-layout.mobile-keyboard-open .mobile-sheet{bottom:0;max-height:calc(var(--mobile-height,100dvh) - 80px);top:calc(var(--mobile-top,0px) + 12px)}.mobile-layout.mobile-keyboard-open .mobile-sheet-backdrop{inset:0}.mobile-layout footer{font-size:8px;line-height:1.5;margin:15px 10px}
@media(max-width:360px){.mobile-layout .mobile-meter{width:74px}.mobile-layout .paperdoll{gap:5px;padding:8px}.mobile-layout .paperdoll canvas{width:96px;height:120px}.mobile-layout .inventory{gap:5px}.mobile-layout .joystick{width:106px;height:106px}.mobile-layout .mobile-actions{gap:6px;right:12px}.mobile-actions #mobileAttack{width:67px;height:67px}.mobile-actions button{width:58px;height:58px}}
@media(orientation:landscape) and (max-height:600px){.mobile-layout{--head-height:37px;--hud-height:44px;--nav-height:52px}.mobile-layout .topbar h1{font-size:16px}.mobile-layout #logout{min-height:30px}.mobile-layout .mobile-vitals{gap:12px;padding:3px 12px}.mobile-layout .mobile-vitals>div:first-child{display:flex;align-items:center;gap:8px}.mobile-layout .mobile-meter{height:21px;width:115px}.mobile-layout .joystick{width:93px;height:93px;bottom:9px}.joystick-thumb{width:43px;height:44px}.mobile-layout .mobile-actions{bottom:10px}.mobile-actions #mobileAttack{width:62px;height:62px}.mobile-actions button{width:54px;height:54px}.mobile-layout .touch-pad{grid-template-columns:repeat(3,44px);grid-template-rows:repeat(3,44px);bottom:6px}.mobile-layout .touch-pad button{height:44px}.mobile-layout .mobile-sheet{top:calc(var(--safe-top) + 40px);left:max(12%,env(safe-area-inset-left));right:max(12%,env(safe-area-inset-right));max-height:calc(var(--mobile-height,100dvh) - 88px)}.mobile-sheet-header{padding:7px 12px 2px}.mobile-sheet-header h2{font-size:18px}.mobile-sheet-tabs{padding-bottom:5px}.mobile-layout .mobile-navigation button{min-height:40px;gap:0}.mobile-layout .mobile-navigation button>span{font-size:17px}.mobile-layout .mobile-navigation small{font-size:8px}.mobile-layout .map-wrap{width:220px}.mobile-layout .map-wrap canvas{max-height:none}.mobile-layout .toast{bottom:106px}}
@media(prefers-reduced-motion:reduce){.mobile-meter>i{transition:none}}

/* Compact sheets leave the world visible; long windows scroll within a safe maximum. */
.mobile-layout .mobile-sheet{top:auto;height:auto;max-height:calc(var(--mobile-height,100dvh) - var(--head-height) - var(--hud-height) - var(--safe-top) - var(--nav-height) - var(--safe-bottom) - 16px)}
.mobile-layout .mobile-sheet-backdrop{top:calc(var(--head-height) + var(--hud-height) + var(--safe-top))}
.mobile-layout.mobile-keyboard-open .mobile-sheet{top:calc(var(--mobile-top,0px) + 12px);bottom:0;max-height:calc(var(--mobile-height,100dvh) - 24px)}
.mobile-layout.mobile-keyboard-open .mobile-sheet-tabs,.mobile-layout.mobile-keyboard-open .mobile-sheet-kicker{display:none}

body.mobile-layout.in-realm .mobile-chase{display:block;position:absolute;right:calc(18px + env(safe-area-inset-right));bottom:160px;z-index:7;font-size:11px;min-height:30px;padding:5px 9px;border-radius:16px;background:#302d32e8;touch-action:manipulation}body.mobile-layout .mobile-chase[aria-pressed=true]{color:#ffe4a3;border-color:#d5bc76}body.mobile-layout #changeOutfit{display:none}body.mobile-layout.in-realm #changeOutfit{display:block;font-size:9px;padding:4px 5px}body.mobile-layout .top-actions{gap:4px}body.mobile-layout .outfit-choices button{min-height:40px}body.mobile-layout #outfitForm{padding-bottom:6px}@media(max-height:500px){body.mobile-layout.in-realm .mobile-chase{bottom:145px;right:calc(14px + env(safe-area-inset-right))}}

body.mobile-layout #outfitPreview{width:96px;height:120px}body.mobile-layout .outfit-choices button{min-height:36px;padding:6px 4px}body.mobile-layout .outfit-colors{gap:6px;margin:8px 0}

.mobile-layout .topbar>div:first-child{min-width:0;flex:1}.mobile-layout .topbar h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(14px,4.6vw,18px)}.mobile-layout .top-actions{flex:none;margin-left:5px}.mobile-layout .outfit-colors label{margin:4px 0}

/* Gameplay controls keep a clear center view and leave safe-area space below. */
.mobile-layout .mobile-vitals{width:100%;min-width:0;max-width:100%;overflow:hidden}.mobile-layout .mobile-vitals>div:first-child{flex:1 1 0;width:0}.mobile-layout .mobile-meter{width:86px}
.mobile-layout #expandMobileSheet{font-size:12px;width:auto;min-width:64px;flex-shrink:0}.mobile-layout.mobile-sheet-open .mobile-actions,.mobile-layout.mobile-sheet-open .joystick,.mobile-layout.mobile-sheet-open .mobile-chase{visibility:hidden}
body.mobile-layout{--head-height:44px;--hud-height:40px;overscroll-behavior:none;-webkit-tap-highlight-color:transparent}.mobile-layout.in-realm{overflow:hidden;user-select:none;-webkit-user-select:none}.mobile-layout input,.mobile-layout textarea{user-select:text;-webkit-user-select:text}.mobile-layout .topbar{gap:4px}.mobile-layout .topbar h1{font-size:15px}.mobile-layout #changeOutfit,.mobile-layout #logout{min-height:44px;padding:4px 7px}.mobile-layout .account-form{padding:18px}.mobile-layout .account-form h2{font-size:24px}.mobile-layout .account-form p{margin:6px 0}.mobile-layout .mobile-vitals{gap:7px}.mobile-layout .mobile-meter{height:27px;min-width:86px}.mobile-layout .mobile-meter>span{font:bold 13px monospace;text-shadow:1px 1px 2px #07151c}.mobile-layout .mobile-vitals>div:first-child{min-width:0}.mobile-layout .mobile-actions{display:grid;grid-template-columns:58px 72px;grid-template-rows:44px 72px;gap:6px;bottom:16px;align-items:center;justify-items:center}.mobile-layout .mobile-actions #mobileInteract{grid-column:1;grid-row:1;width:44px;height:44px}.mobile-layout .mobile-actions #mobileInteract>span{font-size:18px}.mobile-layout .mobile-actions #mobileHeal{grid-column:1;grid-row:2;width:58px;height:58px;border-color:#9bbf86;background:radial-gradient(circle at 35% 25%,#597d54ee,#234a3bef)}.mobile-layout .mobile-actions #mobileAttack{grid-column:2;grid-row:2;width:72px;height:72px}.mobile-layout .mobile-actions #mobileAttack.attack-ready{border-color:#f0d69a}.mobile-layout .mobile-actions .unusable{opacity:.5}.mobile-layout .mobile-actions .tapped{transform:scale(.91);filter:brightness(1.3)}.mobile-layout .mobile-chase{right:max(16px,env(safe-area-inset-right));bottom:102px;min-height:44px}.mobile-layout #mobileHealMenu{position:absolute;z-index:22;right:12px;bottom:148px;width:min(270px,calc(100% - 24px));max-height:50%;overflow:auto;background:#1c3338f5;border:1px solid #afbc8e;border-radius:10px;padding:9px;color:#efe5c5;touch-action:pan-y;box-shadow:0 5px 18px #04131999}.mobile-layout #mobileHealMenu strong{display:block;font-size:12px;margin-bottom:6px}.mobile-layout #mobileHealMenu button{display:block;min-height:44px;width:100%;margin-top:5px;background:#304f47;border:1px solid #718871;color:#e7ead1;text-align:left;padding:7px;border-radius:5px}.mobile-layout #mobileHealMenu button.unusable{color:#9fae9f}.mobile-layout #mobileHealMenu p{font-size:12px}.mobile-layout #mobileFrameMode{display:block;width:100%;min-height:44px;background:#1d353c;color:#eee1bd;margin-top:6px;font-size:16px}.mobile-layout #expandMobileSheet{min-height:44px;border:1px solid #81946f;background:#2a4645;color:#eadcbb;border-radius:6px;padding:5px 9px;margin-left:auto}.mobile-layout .mobile-sheet-header{padding:7px 12px;gap:6px}.mobile-layout .mobile-sheet-header h2{font-size:18px}.mobile-layout .mobile-sheet-kicker{display:none}.mobile-layout[data-mobile-panel=bag] .mobile-sheet,.mobile-layout[data-mobile-panel=equipment] .mobile-sheet,.mobile-layout[data-mobile-panel=spells] .mobile-sheet{height:50%;max-height:50%}.mobile-layout.mobile-sheet-expanded .mobile-sheet{height:calc(var(--mobile-height) - var(--head-height) - var(--hud-height) - var(--nav-height) - var(--safe-bottom) - var(--safe-top) - 12px);max-height:calc(var(--mobile-height) - var(--head-height) - var(--hud-height) - var(--nav-height) - var(--safe-bottom) - var(--safe-top) - 12px)}.mobile-layout .window-body button,.mobile-layout .mini-controls button{min-height:44px}.mobile-layout .mini-controls button{min-width:44px}.mobile-layout .zoom-controls button{width:44px;height:44px}.mobile-layout .toast{bottom:160px;pointer-events:none;max-width:calc(100% - 24px);padding:7px 10px}.mobile-layout .mobile-sheet button:active{filter:brightness(1.2)}
@media(orientation:landscape) and (max-height:600px){.mobile-layout .mobile-actions{bottom:6px;grid-template-columns:52px 60px;grid-template-rows:44px 60px;gap:3px}.mobile-layout .mobile-actions #mobileHeal{width:52px;height:52px}.mobile-layout .mobile-actions #mobileAttack{width:60px;height:60px}.mobile-layout .mobile-chase{bottom:72px;right:14px}.mobile-layout #mobileHealMenu{bottom:112px;max-height:60%}.mobile-layout[data-mobile-panel=bag] .mobile-sheet,.mobile-layout[data-mobile-panel=equipment] .mobile-sheet,.mobile-layout[data-mobile-panel=spells] .mobile-sheet{height:65%;max-height:65%}.mobile-layout.mobile-sheet-expanded .mobile-sheet{height:75%;max-height:75%}.mobile-layout .toast{bottom:120px}}

.mobile-layout .quest-tracker{top:62px;left:10px;max-width:calc(100% - 150px);font-size:13px;line-height:1.3}
.mobile-layout .quest-track{min-height:44px;width:100%;font-size:13px}
.mobile-layout .quest-section h3,.mobile-layout .quest-later>summary{font-size:13px}
.mobile-layout #questText{overflow-x:hidden}

/* Essential windows are bounded overlays; only their own rectangle catches touches. */
body.mobile-layout.mobile-sheet-compact .mobile-sheet{top:calc(var(--mobile-top,0px) + var(--head-height) + var(--hud-height) + var(--safe-top) + 8px);bottom:auto;left:auto;right:max(8px,env(safe-area-inset-right));width:min(340px,calc(100% - 16px));height:min(35dvh,290px);max-height:calc(var(--mobile-height,100dvh) - var(--head-height) - var(--hud-height) - var(--nav-height) - var(--safe-top) - var(--safe-bottom) - 190px);border:1px solid #8b9a77;border-radius:5px;box-shadow:0 3px 9px #04171b66}
body.mobile-layout.mobile-sheet-compact .viewport-column{width:100%}
body.mobile-layout.mobile-sheet-compact .world-wrap{flex:1;height:auto!important}
body.mobile-layout.mobile-sheet-compact .mobile-actions,body.mobile-layout.mobile-sheet-compact .joystick,body.mobile-layout.mobile-sheet-compact .mobile-chase{visibility:visible}
body.mobile-layout.mobile-sheet-compact .mobile-sheet-backdrop{display:none}
body.mobile-layout.mobile-sheet-compact .mobile-sheet-tabs{display:none}
body.mobile-layout.mobile-sheet-compact .mobile-sheet-header{padding:0 5px;gap:4px;min-height:44px}
body.mobile-layout.mobile-sheet-compact .mobile-sheet-header h2{font-size:14px;margin:0}
body.mobile-layout.mobile-sheet-compact .mobile-sheet-header button{min-width:44px;height:44px;border-radius:3px;font-size:20px}
body.mobile-layout.mobile-sheet-compact #expandMobileSheet{font-size:11px;min-width:58px;padding:3px}
body.mobile-layout.mobile-sheet-compact .sidebar{padding:0 7px 6px;touch-action:pan-y}
body.mobile-layout.mobile-sheet-compact .window-body{padding:0 0 4px}
body.mobile-layout.mobile-sheet-compact .inventory{gap:4px;padding:0}
body.mobile-layout.mobile-sheet-compact .bag-item{min-height:49px;border-radius:2px;padding:2px}
body.mobile-layout.mobile-sheet-compact .bag-item .item-icon{width:28px;height:28px}
body.mobile-layout.mobile-sheet-compact .bag-item small{font-size:8px}
body.mobile-layout.mobile-sheet-compact .sidebar p{font-size:11px;margin:5px 0;line-height:1.35}
body.mobile-layout.mobile-sheet-compact .paperdoll{padding:3px;gap:4px;border-radius:2px}
body.mobile-layout .paperdoll canvas{display:none}
body.mobile-layout .equipment{width:100%;grid-template-columns:repeat(3,minmax(0,1fr))}
body.mobile-layout .slot{min-height:48px;padding:2px;border-radius:3px}
body.mobile-layout .slot .item-icon{width:28px;height:28px}
body.mobile-layout.mobile-sheet-compact.mobile-sheet-minimized .mobile-sheet{height:44px;max-height:44px}
body.mobile-layout.mobile-sheet-minimized .sidebar,body.mobile-layout.mobile-sheet-minimized .mobile-sheet-tabs{display:none}
body.mobile-layout .item-inspector{position:sticky;top:0;z-index:1;background:#192c32;border:1px solid #6d806b;padding:5px;font-size:11px}
body.mobile-layout .item-inspector button{min-height:44px;margin:3px 4px 0 0}
@media(orientation:landscape) and (max-height:600px){body.mobile-layout.mobile-sheet-compact .mobile-sheet{width:min(330px,48vw);height:calc(var(--mobile-height,100dvh) - var(--head-height) - var(--hud-height) - var(--nav-height) - var(--safe-top) - var(--safe-bottom) - 126px);max-height:none}body.mobile-layout.mobile-sheet-compact .mobile-sheet-header{min-height:44px}body.mobile-layout.mobile-sheet-compact .sidebar{min-height:0}}

body.mobile-layout.mobile-sheet-compact #questText .quest-field{font-size:13px;line-height:1.4}

body.mobile-layout.mobile-sheet-compact .panel-title{display:none}

@media(orientation:landscape) and (max-height:600px){body.mobile-layout.in-realm .mobile-chase{bottom:69px;right:max(16px,env(safe-area-inset-right));width:60px;min-height:44px;padding:2px;font-size:10px}}
/* Mobile UI 2.0: quiet feedback, edge actions and bottom-docked compact windows. */
.toast{pointer-events:none;font:12px/1.35 monospace;max-width:320px;padding:5px 9px;box-shadow:none;border:1px solid #7d8e77;background:#122229ed}
.toast[data-priority=major]{border-color:#c4a66b;font-size:14px;padding:8px 12px}
#lootFeed{position:absolute;left:12px;top:100px;max-width:190px;pointer-events:none;z-index:8;font:12px/1.5 monospace;color:#ded9bc;text-shadow:1px 1px #080e12,-1px -1px #080e12}
#lootFeed .rare{color:#f2d187;font-weight:bold}
#hotkeyEditor{position:absolute;z-index:32;right:76px;bottom:20px;width:min(340px,calc(100% - 94px));max-height:70%;overflow:auto;padding:9px;background:#152b32f5;border:1px solid #aa9a70;border-radius:5px;touch-action:pan-y}
#hotkeyEditor strong{display:inline-block;margin:5px}#hotkeyEditor button,#hotkeyEditor select{min-height:44px;color:#ece2bf;background:#29413e;border:1px solid #73816a;border-radius:3px;padding:4px}
.hotkey-edit-row{display:flex;gap:3px;margin:5px 0}.hotkey-edit-row select{min-width:0;flex:1}.hotkey-edit-row button{min-width:44px}#newHotkeyAction{width:100%}
#customHotkeys{display:contents}
body.mobile-layout.in-realm .mobile-actions{display:flex;flex-direction:column;justify-content:flex-start;gap:5px;right:max(7px,env(safe-area-inset-right));top:72px;bottom:8px;width:58px;max-height:calc(100% - 84px);overflow:auto;overscroll-behavior:contain;pointer-events:auto;touch-action:pan-y;scrollbar-width:thin;padding:2px}
body.mobile-layout .mobile-actions button,body.mobile-layout .mobile-actions #mobileAttack,body.mobile-layout .mobile-actions #mobileHeal,body.mobile-layout .mobile-actions #mobileInteract{flex:0 0 auto;width:54px;height:54px;min-height:44px;border-radius:5px;padding:3px;font-size:11px;touch-action:manipulation;display:flex;flex-direction:column;justify-content:center;align-items:center}
body.mobile-layout .mobile-actions button>span{font-size:18px}body.mobile-layout .mobile-actions small{font-size:9px;line-height:1.1;max-width:100%;overflow-wrap:anywhere}
body.mobile-layout .mobile-actions .custom-hotkey>span{font-size:10px}body.mobile-layout .custom-hotkey img{width:22px;height:22px;image-rendering:pixelated}body.mobile-layout .mobile-actions .unusable{opacity:.55}body.mobile-layout .mobile-actions button:active{filter:brightness(1.35)}
body.mobile-layout.in-realm .mobile-chase{bottom:12px;right:82px;min-height:44px;width:64px;font-size:11px}
body.mobile-layout #mobileHealMenu{right:76px;bottom:20px;max-height:70%}
body.mobile-layout .toast{left:50%;right:auto;bottom:155px;transform:translateX(-50%);max-width:calc(100% - 160px);font-size:11px;padding:5px 7px}
body.mobile-layout #lootFeed{top:112px;left:10px;max-width:calc(100% - 100px);font-size:11px}
body.mobile-layout.mobile-sheet-compact .mobile-sheet{top:auto;bottom:calc(var(--nav-height) + var(--safe-bottom) + 150px);left:max(7px,env(safe-area-inset-left));right:78px;width:auto;height:min(30dvh,250px);max-height:calc(var(--mobile-height) - var(--head-height) - var(--hud-height) - var(--nav-height) - var(--safe-top) - var(--safe-bottom) - 170px);border-radius:7px 7px 3px 3px}
body.mobile-layout.mobile-sheet-compact .mobile-sheet-header h2{font-size:12px}body.mobile-layout.mobile-sheet-compact .mobile-sheet-header button{min-width:38px}body.mobile-layout.mobile-sheet-compact #expandMobileSheet{min-width:50px;font-size:10px}
body.mobile-layout.mobile-sheet-compact[data-mobile-panel=party] .party-rules,body.mobile-layout.mobile-sheet-compact #partyInvite,body.mobile-layout.mobile-sheet-compact #partyInvitations,body.mobile-layout.mobile-sheet-compact .party-member-actions,body.mobile-layout.mobile-sheet-compact .party-actions,body.mobile-layout.mobile-sheet-compact #partyLootRules{display:none}
body.mobile-layout .party-member{padding:5px;border-radius:3px;text-align:left;min-height:58px}body.mobile-layout .party-member small{font-size:10px}body.mobile-layout .party-meter{height:5px}
body.mobile-layout .mobile-navigation button{touch-action:manipulation}body.mobile-layout .mobile-sheet{transition:height .12s ease-out}
@media(orientation:landscape) and (max-height:600px){body.mobile-layout.in-realm .mobile-actions{top:8px;max-height:calc(100% - 16px);width:110px;display:grid;grid-template-columns:repeat(2,50px);align-content:start;gap:4px}body.mobile-layout .mobile-actions button,body.mobile-layout .mobile-actions #mobileAttack,body.mobile-layout .mobile-actions #mobileHeal,body.mobile-layout .mobile-actions #mobileInteract{width:50px;height:50px}body.mobile-layout.mobile-sheet-compact .mobile-sheet{left:150px;right:130px;width:auto;bottom:calc(var(--nav-height) + var(--safe-bottom) + 5px);height:170px;max-height:calc(var(--mobile-height) - var(--head-height) - var(--hud-height) - var(--nav-height) - var(--safe-bottom) - 14px)}body.mobile-layout.in-realm .mobile-chase{right:130px;bottom:8px}body.mobile-layout #hotkeyEditor,body.mobile-layout #mobileHealMenu{right:125px}body.mobile-layout .toast{bottom:20px}body.mobile-layout #lootFeed{top:60px}}
@media(prefers-reduced-motion:reduce){body.mobile-layout .mobile-sheet{transition:none}}
body.mobile-layout.mobile-sheet-compact .mobile-sheet{left:clamp(112px,35vw,150px);right:74px;bottom:calc(var(--nav-height) + var(--safe-bottom) + 7px);height:205px;min-height:0;max-height:32dvh}
body.mobile-layout.mobile-sheet-compact .mobile-sheet-header{flex-wrap:wrap;justify-content:flex-end;gap:2px;padding:2px 4px}body.mobile-layout.mobile-sheet-compact .mobile-sheet-header>div{flex:1 0 100%;min-width:0}body.mobile-layout.mobile-sheet-compact .mobile-sheet-header button{min-height:44px;min-width:38px;height:44px}body.mobile-layout.mobile-sheet-compact .mobile-sheet-header h2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.mobile-layout .party-open{left:9px;right:auto;top:53px;min-height:44px}
@media(orientation:landscape) and (max-height:600px){body.mobile-layout.mobile-sheet-compact .mobile-sheet{left:150px;right:130px;height:165px;max-height:calc(var(--mobile-height) - var(--head-height) - var(--hud-height) - var(--nav-height) - var(--safe-bottom) - 14px)}body.mobile-layout.mobile-sheet-compact .mobile-sheet-header{flex-wrap:nowrap}body.mobile-layout.mobile-sheet-compact .mobile-sheet-header>div{flex:1 1 auto}body.mobile-layout .party-open{top:5px;left:150px}}
body.mobile-layout .toast{top:175px;bottom:auto;max-width:calc(100% - 100px);z-index:24} @media(orientation:landscape) and (max-height:600px){body.mobile-layout .toast{top:55px;bottom:auto}}
body.mobile-layout .item-inspector{position:static}body.mobile-layout .mobile-actions #mobileAttack,body.mobile-layout .mobile-actions #mobileHeal{position:relative;overflow:hidden}body.mobile-layout .mobile-actions #mobileAttack::after,body.mobile-layout .mobile-actions #mobileHeal::after{content:'';position:absolute;left:0;bottom:0;height:3px;width:var(--cooldown-ready,100%);background:#d6c38a;pointer-events:none}body.mobile-layout .mobile-actions #mobileHeal::after{background:#9bd3a6}
/* The Party HUD already supplies the combat indicator; management remains in More → Party. */
body.mobile-layout .party-hud:not([hidden]) ~ .party-open{display:none}

body.mobile-layout #mobileSheet.libera-free-window{left:var(--free-x)!important;top:var(--free-y)!important;right:auto!important;bottom:auto!important;transform:none!important;width:var(--free-width)!important;margin:0!important}
body.mobile-layout .mobile-sheet-header.libera-window-title{height:40px!important;min-height:40px!important;padding:0 5px!important}body.mobile-layout .libera-window-title .mobile-sheet-kicker{display:none!important}body.mobile-layout #mobileSheet .libera-window-title h2{font-size:13px!important}
