/* Preserve native window artwork. Mobile owns the outer bounds and touch helpers only. */
.mobile-window-heading,.mobile-stat-editor,.mobile-inventory-nav,.mobile-spell-cast,.mobile-inventory-actions,.mobile-combat-prepare{display:none}
.mobile-native-stage{display:contents}
.mobile-war-actions{display:none}
:root body.mobile-hud .mobile-war-actions{display:flex;flex-wrap:wrap;gap:8px;padding:12px;background:#101923f5;color:var(--hud-white);font:13px/1.5 Tahoma}
:root body.mobile-hud .mobile-war-buttons{display:contents}
:root body.mobile-hud .mobile-war-notice{flex:1 1 100%;margin:0;overflow-wrap:anywhere}
:root body.mobile-hud #npc-war .mobile-war-actions :is(button,select){position:static;flex:1 1 120px;min-height:44px;min-width:44px;padding:8px;font:13px Tahoma;color:var(--hud-white);border:1px solid var(--hud-line);background:var(--hud-glass)}
:root body.mobile-hud #npc-war .mobile-war-actions select{flex-basis:100%;font-size:16px}
:root body.mobile-hud #npc-war :is(.npc-art-button,.npc-window-art [role=status],.npc-art-label:has(select)){display:none}
/* Override legacy CSS and inline z-index only while the mobile HUD is active. */
:root body.mobile-hud .mobile-layer-window{z-index:var(--mobile-window-layer,40)!important}
:root body.mobile-hud .mobile-game-window{
 --window-max:560px;position:fixed!important;inset:auto!important;
 top:calc(var(--mobile-top) + var(--mobile-window-offset,0px))!important;
 left:var(--mobile-left)!important;right:var(--mobile-right)!important;width:auto!important;
 min-width:0!important;max-width:var(--window-max)!important;height:auto!important;
 max-height:calc(var(--mobile-window-height,100dvh) - var(--mobile-top) - var(--mobile-bottom))!important;
 margin:0 auto!important;padding:0!important;transform:none!important;display:block!important;
 overflow:auto!important;overscroll-behavior:contain;scroll-padding:60px 8px 12px;touch-action:pan-y;
 border:1px solid var(--hud-line);border-image:none;border-radius:8px;background:#101923f5;
 color:var(--hud-white);box-shadow:none;filter:none;box-sizing:border-box;
}
:root body.mobile-hud .mobile-game-window[hidden],:root body.mobile-hud dialog.mobile-game-window:not([open]){display:none!important}
/* Offers use the original plates and the real bag in one scrolling column. */
.mobile-inventory-stack[hidden]{display:none}
body.mobile-hud .mobile-inventory-stack{
 --stack-width:min(460px,calc(100vw - var(--mobile-left) - var(--mobile-right)));
 position:fixed;z-index:100;top:calc(var(--mobile-top) + var(--mobile-window-offset,0px));
 left:var(--mobile-left);right:var(--mobile-right);width:var(--stack-width);
 max-height:calc(var(--mobile-window-height,100dvh) - var(--mobile-top) - var(--mobile-bottom));
 margin-inline:auto;overflow:auto;overscroll-behavior:contain;scrollbar-width:none;touch-action:pan-y
}
:root body.mobile-hud .mobile-inventory-stack>#inventory{
 --inventory-scale:min(1.4,calc(var(--stack-width)/329px))!important;
 position:relative;inset:auto!important;width:calc(329px * var(--inventory-scale))!important;
 height:calc(359px * var(--inventory-scale))!important;margin:8px auto 0
}
:root body.mobile-hud .mobile-inventory-stack #item-grid .item-cell{touch-action:pan-y}
:root body.mobile-hud .mobile-inventory-stack>.mobile-game-window{
 position:relative!important;inset:auto!important;width:var(--stack-width)!important;
 max-width:none!important;max-height:none!important;margin:0!important;
 overflow:visible!important;border:0;background:transparent
}
:root body.mobile-hud .mobile-inventory-stack>.mobile-game-window>:not(.mobile-window-heading){margin:0;max-width:none}
body.mobile-hud:has(.mobile-inventory-stack>#inventory:not([hidden])) :is(.exchange-open-bag,.duel-open-bag){display:none}
:root body.mobile-hud #status{--window-max:402px}
:root body.mobile-hud #inventory{--window-max:430px}
:root body.mobile-hud .guide-book{height:auto!important;min-height:0}
:root body.mobile-hud .guide-book-body{min-height:0;overflow:visible}
:root body.mobile-hud .guide-book button{min-height:44px}
:root body.mobile-hud #aux-window[data-kind=party]{--window-max:404px}
:root body.mobile-hud #aux-window[data-kind=combat]{--window-max:780px}
:root body.mobile-hud #aux-window:is([data-kind=magic],[data-kind=ability]){--window-max:122px;left:auto!important;right:var(--mobile-right)!important;width:122px!important;overflow:visible!important;background:#10202be8}
:root body.mobile-hud #aux-window[data-kind=mail]{--window-max:760px}
:root body.mobile-hud #aux-window[data-kind=report]{--window-max:460px}
:root body.mobile-hud #aux-window[data-kind=system]{--window-max:480px}
:root body.mobile-hud .exchange-window{--window-max:443px}
:root body.mobile-hud .duel-panel{--window-max:460px}
:root body.mobile-hud .fame-window{--window-max:540px}
:root body.mobile-hud .profession-window{--window-max:620px}
:root body.mobile-hud .mobile-window-heading{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:52px;padding:4px 8px 4px 12px;margin:0;background:#101923f5;border-bottom:1px solid var(--hud-line);z-index:10;color:white;font:14px/1.4 Tahoma,sans-serif}
:root body.mobile-hud .mobile-window-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:inherit}
:root body.mobile-hud :is(#status,#inventory,#aux-window,.mobile-game-window)>.mobile-window-heading>.mobile-window-close{position:static;display:grid;place-content:center;flex:none;min-width:44px;width:44px;min-height:44px;height:44px;margin:0;padding:0;background:none;border:0;color:white;font:26px/1 Tahoma;box-shadow:none;touch-action:manipulation}
:root body.mobile-hud .mobile-window-close:focus-visible{outline:2px solid white}
:root body.mobile-hud #aux-window:is([data-kind=magic],[data-kind=ability]) .mobile-window-heading{padding-left:6px;font-size:11px;gap:2px}
/* A stage measures the painted bounds, not the unscaled CSS box. Height never sets scale. */
body.mobile-hud .mobile-native-stage{display:block;position:relative;flex:none;box-sizing:content-box;width:calc(var(--native-width) * var(--native-scale));height:calc(var(--native-height) * var(--native-scale) + 12px);margin:8px auto;overflow:clip}
:root body.mobile-hud :is(#status,#inventory,#aux-window,.friends-window) .mobile-native-stage>:is(.status-surface,.inventory-surface,.party-native-surface,.friends-native){transform:scale(var(--native-scale));transform-origin:top left}
body.mobile-hud .mobile-native-stage>.combat-plate-wrap{width:calc(325px * var(--native-scale));height:calc(420px * var(--native-scale))}
body.mobile-hud .mobile-native-stage .combat-plate{transform:scale(var(--native-scale));transform-origin:top left}
:root body.mobile-hud #npc-war .mobile-native-stage>.npc-window-art{transform:scale(var(--native-scale));transform-origin:top left}
:root body.mobile-hud #status .status-debug{display:none}
/* Native tabs have more vertical hit room without moving text or stretching the plate. */
:root body.mobile-hud #status #status-tabs button::before{content:'';position:absolute;left:0;right:0;top:-8px;height:calc(44px / var(--native-scale));background:transparent}
/* Small native + controls stay where the artwork expects them; this stepper avoids overlapping hit areas. */
body.mobile-hud .mobile-stat-editor{display:grid;grid-template-columns:minmax(0,1fr) 48px;align-items:end;gap:8px;padding:12px;margin:0;border-top:1px solid var(--hud-line);background:#101923d9;font:13px/1.5 Tahoma}
body.mobile-hud .mobile-stat-editor label{display:grid;gap:4px;min-width:0}
body.mobile-hud .mobile-stat-editor p{grid-column:1/-1;margin:0;font-size:12px}
:root body.mobile-hud .mobile-stat-editor :is(button,select){position:static;min-height:44px;min-width:44px;width:100%;height:44px;max-width:100%;padding:6px 10px;font:16px Tahoma;border:1px solid var(--hud-line);background:#10192380;color:white}
:root body.mobile-hud #inventory .item-cell{touch-action:pan-y}
:root body.mobile-hud #inventory :is(#inventory-spell,#close-bag)::before{content:'';position:absolute;left:0;right:0;top:50%;height:calc(44px / var(--inventory-scale));transform:translateY(-50%);background:transparent}
body.mobile-hud #item-hover.item-hover-interactive .mobile-inventory-actions{pointer-events:auto}
body.mobile-hud #item-hover .mobile-inventory-actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 0;padding:8px 0 0;border-top:1px solid #a39470;background:none}
body.mobile-hud #item-hover .mobile-inventory-actions>button{min-height:44px;min-width:44px;padding:8px 12px;font:14px Tahoma;color:#f5ead0;background:#302a20;border:1px solid #a39470}
/* Do not globally enlarge native controls: that destroys their asset coordinates. */
:root body.mobile-hud #aux-window>.panel-heading{display:none}
:root body.mobile-hud #aux-window #aux-body{min-width:0;min-height:0;max-height:none;margin:0;padding:12px;overflow:visible}
:root body.mobile-hud #aux-window[data-kind=party] #aux-body{padding:0}
:root body.mobile-hud #aux-window[data-kind=party] .party-native-button::before{content:'';position:absolute;left:0;right:0;top:50%;height:calc(44px / var(--native-scale));transform:translateY(-50%);background:transparent}
/* Preserve combat's plate, its six skill positions and original element tabs. */
body.mobile-hud .combat-original{display:flex;flex-direction:column;align-items:center;gap:12px}
:root body.mobile-hud .combat-detail{box-sizing:border-box;width:100%;min-width:0;margin:0;padding:12px;font:13px/1.65 Tahoma}
body.mobile-hud .combat-detail :is(p,li){font-size:13px;line-height:1.65}
body.mobile-hud .mobile-combat-prepare{display:block}
:root body.mobile-hud #aux-window[data-kind=combat] .combat-detail-actions{display:flex;flex-wrap:wrap;gap:8px}
:root body.mobile-hud #aux-window[data-kind=combat] .combat-detail-actions button{min-width:100px;min-height:44px;padding:8px;font-size:13px}
:root body.mobile-hud #aux-window[data-kind=combat] [data-reset-combat]{min-width:44px;min-height:44px;padding:8px;font-size:13px}
:root body.mobile-hud #aux-window[data-kind=combat] .combat-native-skill{touch-action:pan-y}
:root body.mobile-hud #aux-window[data-kind=combat] .combat-native-skill::after,:root body.mobile-hud #aux-window[data-kind=combat] .combat-native-tabs button::after,:root body.mobile-hud #aux-window[data-kind=combat] .combat-native-plus::after,:root body.mobile-hud #aux-window[data-kind=combat] .combat-native-done::after{content:'';position:absolute;left:50%;top:50%;width:max(100%,calc(44px / var(--native-scale)));height:max(100%,calc(44px / var(--native-scale)));transform:translate(-50%,-50%);background:transparent}
@media(min-width:680px){body.mobile-hud .combat-original{flex-direction:row;align-items:flex-start;gap:16px}body.mobile-hud .combat-original>.mobile-native-stage{margin:0;flex:0 0 auto}body.mobile-hud .combat-detail{flex:1;width:auto;min-width:240px}}
/* The original two-column magic rail remains narrow; its details stay beside it. */
:root body.mobile-hud #aux-window:is([data-kind=magic],[data-kind=ability]) #aux-body{padding:0}
:root body.mobile-hud :is(#spell-list,#ability-list).spell-icon-grid{grid-template-columns:44px 44px;gap:8px;padding:6px 8px;max-height:calc(var(--mobile-window-height,100dvh) - var(--mobile-top) - var(--mobile-bottom) - 54px)}
:root body.mobile-hud #aux-window:is([data-kind=magic],[data-kind=ability]) .spell-icon-cell{width:44px;height:44px;min-height:44px;touch-action:pan-y}
:root body.mobile-hud .spell-hover-card{box-sizing:border-box;overflow:auto;font-size:13px;line-height:1.65;scroll-padding:8px;overscroll-behavior:contain}
body.mobile-hud .mobile-spell-cast{display:block}
:root body.mobile-hud #aux-window:is([data-kind=magic],[data-kind=ability]) .spell-menu-actions{gap:8px}
:root body.mobile-hud #aux-window:is([data-kind=magic],[data-kind=ability]) .spell-menu-actions button{min-height:44px;min-width:44px;padding:8px;font:13px/1.4 Tahoma}
/* Existing forms keep their skin. Use consistent padding, readable inputs and grouped controls. */
:root body.mobile-hud .mobile-game-window :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-width:0;max-width:100%;box-sizing:border-box;font-size:16px}
:root body.mobile-hud .mobile-game-window :is(input:not([type=checkbox]):not([type=radio]),select){min-height:44px}
:root body.mobile-hud .mobile-game-window :is(button,summary){touch-action:manipulation}
:root body.mobile-hud #aux-window[data-kind=system] #aux-body{padding:12px}
:root body.mobile-hud #aux-window[data-kind=system] .top-actions{display:block;width:100%;min-width:0;margin:0;padding:0}
:root body.mobile-hud #aux-window[data-kind=system] .system-section{padding:16px 0}
:root body.mobile-hud #aux-window[data-kind=system] .system-section:first-of-type{padding-top:12px}
:root body.mobile-hud #aux-window[data-kind=system] .system-section-controls{gap:8px}
:root body.mobile-hud #aux-window[data-kind=system] .system-row{flex-wrap:wrap;gap:8px;padding:8px 10px}
:root body.mobile-hud #aux-window[data-kind=system] .top-actions #mode-button{min-height:44px}
:root body.mobile-hud #aux-window[data-kind=system] .system-row-label{flex:1;min-width:100px}
:root body.mobile-hud #aux-window[data-kind=system] .weather-option{flex-wrap:wrap;gap:8px}
:root body.mobile-hud #aux-window[data-kind=system] .weather-option select{flex:1;min-width:120px;min-height:44px}
:root body.mobile-hud #aux-window[data-kind=system] #system-volume{flex:1;min-width:90px;max-width:none;min-height:44px}
:root body.mobile-hud #aux-window[data-kind=system] :is(button,select){max-width:100%}
:root body.mobile-hud #aux-window[data-kind=system] .language-picker{display:flex;justify-content:space-between;gap:8px;width:100%;min-width:0;white-space:normal}
/* Native mail/report reading layouts already adapt; remove duplicate close buttons, keep their artwork. */
:root body.mobile-hud :is(.mail-tools button,.mail-footer button,.report-heading button,.report-actions button,.report-preview button){min-width:44px;min-height:44px}
:root body.mobile-hud .mail-columns{min-height:0}
:root body.mobile-hud .mail-heading{gap:8px;padding:10px}
:root body.mobile-hud .mail-tools{gap:8px}
:root body.mobile-hud .report-inner{margin:8px;padding:12px}
:root body.mobile-hud .report-actions{gap:8px;flex-wrap:wrap}
:root body.mobile-hud .report-actions button{flex:1;min-width:90px}
/* System panels without bitmap coordinates can use the available column width directly. */
:root body.mobile-hud :is(.friends-window,.exchange-window,.duel-panel,.fame-window,.autoplay-window,.profession-window)>:not(.mobile-window-heading){max-width:100%;margin:12px}
:root body.mobile-hud :is(.friends-window,.exchange-window,.duel-panel,.fame-window,.autoplay-window,.profession-window):not(.mobile-inventory-stack>*) :is(button,summary){min-width:44px;min-height:44px;white-space:normal}
:root body.mobile-hud .friends-window>.mobile-native-stage{max-width:none;margin:8px auto}
:root body.mobile-hud .friends-window{--window-max:300px}
:root body.mobile-hud .friends-content{height:124px}
:root body.mobile-hud .friends-form label{top:216px}
:root body.mobile-hud .friends-form input{top:236px;width:170px;min-width:0;height:44px}
:root body.mobile-hud .friends-native :is(.friends-add,.friends-close){min-width:0;min-height:0}
:root body.mobile-hud .friends-native :is(.friends-add,.friends-close)::before{content:'';position:absolute;inset:-9px 0;background:transparent}
:root body.mobile-hud .friends-list .friends-row button{padding:6px;min-width:44px;min-height:44px}
:root body.mobile-hud .friends-row span{gap:8px}
:root body.mobile-hud .autoplay-window label{display:flex;flex-wrap:wrap;gap:8px;min-height:44px;margin:12px 0}
:root body.mobile-hud .autoplay-window input[type=text],:root body.mobile-hud .autoplay-window select{width:100%;max-width:100%}
:root body.mobile-hud .autoplay-row{padding:12px 0}
:root body.mobile-hud .autoplay-window form>p:has(>button){display:flex;flex-wrap:wrap;gap:8px}
:root body.mobile-hud :is(.duel-panel:not(.mobile-inventory-stack>*),.exchange-request) label{display:grid;gap:6px}
:root body.mobile-hud .profession-list article{gap:8px;padding:12px 0}
:root body.mobile-hud .fame-window table{width:100%;table-layout:fixed;font-size:12px}
:root body.mobile-hud .fame-window :is(th,td){padding:8px 3px;overflow-wrap:anywhere}
:root body.mobile-hud .mobile-game-window label:has(input[type=checkbox]){min-height:44px}
:root body.mobile-hud #help{width:calc(100% - var(--mobile-left) - var(--mobile-right));max-width:560px;max-height:calc(var(--mobile-window-height,100dvh) - 24px);padding:16px;overflow:auto;scroll-padding:56px 0 12px}
:root body.mobile-hud #close-help{position:sticky;top:0;float:right;min-width:44px;min-height:44px;z-index:2}
:root body.mobile-hud #help dl{grid-template-columns:minmax(0,1fr);gap:8px}
:root body.mobile-hud #help dd{margin-bottom:12px}
:root body.mobile-hud #help button{min-height:44px}
:root body.mobile-hud #npc-war .war-surface{width:auto;min-width:0;max-width:100%;padding:12px}
:root body.mobile-hud #npc-war table{width:100%;table-layout:fixed;font-size:12px}
:root body.mobile-hud #npc-war :is(button,summary){min-height:44px;min-width:44px}
:root body.mobile-hud #npc-war :is(th,td){padding:8px 3px;overflow-wrap:anywhere}
@media(max-width:360px){:root body.mobile-hud .mobile-game-window{left:max(4px,env(safe-area-inset-left))!important;right:max(4px,env(safe-area-inset-right))!important}}

/* Settings uses a category list, then one detail page, on every screen size. */
:root body.mobile-hud .mobile-native-window{background:transparent;border:0;border-radius:0;scroll-padding-top:8px}
:root body.mobile-hud .mobile-native-window .mobile-native-stage{margin-top:0}
/* Content windows keep their original heading and close button, with one title only. */
:root body.mobile-hud #aux-window:is([data-kind=system],[data-kind=magic],[data-kind=ability])>.panel-heading{display:flex;min-height:44px;padding:4px 8px}
:root body.mobile-hud #aux-window:is([data-kind=magic],[data-kind=ability])>.panel-heading h2{font-size:11px;margin:0}
:root body.mobile-hud #aux-window:is([data-kind=magic],[data-kind=ability]) #close-aux{width:44px;height:44px;min-width:44px;min-height:44px;padding:0;font-size:24px}
:root body.mobile-hud :is(.guide-book-head,.pf-head){display:flex;position:sticky;top:0;z-index:3}
:root body.mobile-hud .mobile-game-window.profession-window .profession-header{display:flex}
:root body.mobile-hud :is(.guide-book-close,.pf-close,.friends-close,.autoplay-close){min-width:44px;min-height:44px}
:root body.mobile-hud .mobile-game-window.duel-panel .duel-hide{display:block}
:root body.mobile-hud .mobile-game-window :is(.mail-tools [data-close],.report-heading [data-close]){display:block}
:root body #aux-window.original-window[data-kind=system]{background:#111d24f5}
:root body #aux-window.original-window[data-kind=system] .panel-heading{position:sticky;top:0;z-index:3;min-height:52px;height:52px;padding:4px 12px 4px 16px;background:#16252e;border-bottom:1px solid #b69a6433}
:root body #aux-window.original-window[data-kind=system] .panel-heading h2{margin:0;font:700 16px/1.4 Tahoma,sans-serif;letter-spacing:0}
:root body #aux-window.original-window[data-kind=system] #close-aux{width:44px;height:44px;min-height:44px;border:0;background:none;box-shadow:none;font-size:26px}
:root body.mobile-hud #aux-window.original-window[data-kind=system]>.mobile-window-heading{min-height:52px;height:52px;box-sizing:border-box;padding:4px 8px 4px 16px;background:#16252e}
:root body #aux-window.original-window[data-kind=system] #aux-body{padding:12px}
:root body #aux-window.original-window[data-kind=system] .top-actions{display:block;padding:0;margin:0}
:root body #aux-window.original-window[data-kind=system] .system-menu{display:grid;gap:0;overflow:hidden;border:1px solid #b69a6433;border-radius:12px;background:#1b2a32}
:root body #aux-window.original-window[data-kind=system] .top-actions .system-menu-item{display:flex;align-items:center;gap:12px;width:100%;min-height:68px;padding:12px;border:0;border-bottom:1px solid #b69a6424;border-radius:0!important;background:none;box-shadow:none;text-align:left}
:root body #aux-window.original-window[data-kind=system] .system-menu-item:last-child{border-bottom:0}
:root body #aux-window.original-window[data-kind=system] .system-menu-item:hover{background:#b69a6412}
:root body #aux-window.original-window[data-kind=system] .system-menu-item:focus-visible{outline-offset:-3px}
:root body #aux-window.original-window[data-kind=system] .system-menu-icon{display:grid;place-items:center;flex:none;width:36px;height:36px;border:1px solid #d0b37830;border-radius:10px;background:#b69a6418;color:#e0c58f;font:22px/1 Georgia,serif}
:root body #aux-window.original-window[data-kind=system] .system-menu-item .system-row-label{flex:1;min-width:0;font-weight:700}
:root body #aux-window.original-window[data-kind=system] .system-row-label small{margin-top:3px;color:#a1afb4;font:400 11px/1.5 Tahoma,sans-serif}
:root body #aux-window.original-window[data-kind=system] .system-menu-arrow{flex:none;color:#adbaaF;font:24px/1 Tahoma,sans-serif}
:root body #aux-window.original-window[data-kind=system] .system-page-bar{display:flex;align-items:center;gap:8px;margin:0 0 12px}
:root body #aux-window.original-window[data-kind=system] .top-actions .system-back{width:44px;height:44px;min-height:44px;padding:0;border:1px solid #b69a6433;border-radius:10px!important;background:#1b2a32;font:28px/1 Tahoma,sans-serif}
:root body #aux-window.original-window[data-kind=system] .system-page-bar h3{margin:0;color:#ead8ae;font:700 15px/1.5 Tahoma,sans-serif}
:root body #aux-window.original-window[data-kind=system] .system-section{padding:0;border:0}
:root body #aux-window.original-window[data-kind=system] .system-section>h3{display:none}
:root body #aux-window.original-window[data-kind=system] :is(.system-character,.system-help) .system-section-controls{grid-template-columns:minmax(0,1fr)}
:root body #aux-window.original-window[data-kind=system] .system-section-controls{gap:8px}
:root body #aux-window.original-window[data-kind=system] .system-section-controls>:is(button,.system-row,.weather-option,.language-picker){min-height:56px;padding:10px 12px;border:1px solid #b69a6430;border-radius:10px!important;background:#1b2a32}
:root body #aux-window.original-window[data-kind=system] .language-picker{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0;color:#e9dcc1;font:14px/1.5 Tahoma,sans-serif}
:root body #aux-window.original-window[data-kind=system] select{max-width:55%;min-width:0;min-height:44px;padding:6px 10px;border:1px solid #b69a6455;border-radius:7px;background:#132129;color:#ead8ae;font:14px Tahoma,sans-serif}
@media(max-height:500px){:root body #aux-window.original-window[data-kind=system] .system-menu-item{min-height:58px;padding-block:8px}}

/* Content windows share one type/spacing scale in both orientations. The ID in
   :is keeps this contract above legacy skins and lazily loaded dialog styles. */
:root body :is(.guide-book,.profession-window,#aux-window[data-kind=system],#aux-window.game-dialog-frame,.autoplay-window.game-dialog){
 --dialog-space:12px;--dialog-gap:8px;--dialog-control:44px;
 font:13px/1.6 Tahoma,'Segoe UI',sans-serif;overflow-wrap:anywhere;
}
:root body :is(.guide-book,.profession-window,#aux-window[data-kind=system],#aux-window.game-dialog-frame,.autoplay-window.game-dialog) :is(.guide-book-head,.profession-header,.panel-heading,.game-dialog-heading){
 display:flex;align-items:center;justify-content:space-between;flex:none;gap:8px;
 height:60px;min-height:60px;margin:0;padding:8px 12px!important;
 background:#19282f;border-bottom:1px solid #b69a6440;
}
:root body :is(.guide-book,.profession-window,#aux-window[data-kind=system],#aux-window.game-dialog-frame,.autoplay-window.game-dialog) :is(.guide-book-head,.profession-header,.panel-heading,.game-dialog-heading) h2{
 margin:0;font:700 16px/1.5 Tahoma,sans-serif;letter-spacing:0;color:#f2ead7;text-shadow:none;
}
:root body .profession-window .profession-header small{display:none}
:root body :is(.guide-book,.profession-window,#aux-window[data-kind=system],#aux-window.game-dialog-frame,.autoplay-window.game-dialog) :is(.guide-book-close,.profession-header [data-close],#close-aux,.mail-tools button,.report-heading [data-close],.autoplay-close){
 display:grid;place-items:center;flex:none;width:44px;height:44px;min-width:44px;min-height:44px;
 margin:0;padding:0;font:24px/1 Tahoma;color:#edf0ee;background:transparent;border:0;box-shadow:none;
}
:root body :is(.guide-book,.profession-window){background:#142128;color:#edf0ee;border:1px solid #b69a6440;border-radius:12px}
:root body :is(.guide-book-tabs,.profession-tabs){gap:8px;margin:0;padding:0 12px;border-bottom:1px solid #b69a6440}
:root body :is(.guide-book-tabs,.profession-tabs) button{min-height:44px;padding:8px 4px;font:13px/1.5 Tahoma,sans-serif;text-align:center}
:root body :is(.guide-book-body,.profession-body){min-width:0;padding:12px}
:root body .guide-book-body :is(.guide-lead,.guide-monsters,.guide-article p){font-size:13px;line-height:1.6}
:root body .guide-book-body h3{font-size:14px;line-height:1.5}
:root body .profession-window :is(.profession-overview,.profession-trainer){padding:12px}
:root body .profession-window .profession-header{position:sticky;top:0;z-index:3}
:root body.mobile-hud :is(.profession-window,.autoplay-window)>:not(.mobile-window-heading){margin:0;max-width:100%}
:root body.mobile-hud .guide-book.mobile-game-window{
 display:flex!important;overflow:hidden!important;
 height:min(640px,calc(var(--mobile-window-height,100dvh) - var(--mobile-top) - var(--mobile-bottom)))!important;
}
:root body.mobile-hud .guide-book .guide-book-body{flex:1;min-height:0;overflow:auto}
:root body.mobile-hud .guide-book.mobile-game-window[hidden]{display:none!important}
:root body.mobile-hud .profession-window .profession-header{display:flex}
:root body #aux-window.original-window[data-kind=system]>.panel-heading{height:60px;min-height:60px;padding:8px 12px}
:root body #aux-window.original-window[data-kind=system] .top-actions{font-size:13px}
:root body #aux-window.original-window[data-kind=system]{padding:0;border:1px solid #b69a6440;border-image:none;border-radius:12px;background:#142128;box-shadow:0 12px 36px #0006}
:root body.mobile-hud :is(.guide-book,.profession-window){background:#142128}
:root body .profession-window :is(.profession-overview,.profession-detail){background:#101c22;border-color:#b69a6440}
:root body .profession-window .profession-tabs button{background:transparent;border-radius:0;color:#a1afb4}
:root body .profession-window .profession-tabs button[aria-pressed=true]{background:transparent;color:#e0c58f;box-shadow:inset 0 -2px #e0c58f}
:root body.mobile-hud :is(.guide-book,.profession-window,#aux-window[data-kind=system],#aux-window.game-dialog-frame,.autoplay-window.game-dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){font-size:16px}
