:root{--hud-slot:min(7.4vw,12dvh,72px);--native-button:var(--hud-slot);--native-life-fill:url('/client-recovery/assets/images-by-hash/B1126624AC39FCF5A254DEDE5CEB2B753C3BD0CA042344B7BF8F0D56AC62DC83.png');--native-mana-fill:url('/client-recovery/assets/images-by-hash/04F567F2DC0548263CF2122F2AF43008703065F499D0EA9E67F7DDD706EE4F8D.png');--native-vitals-frame:url('/client-recovery/assets/images-by-hash/CA51B18D6E4C5A6D7455A80122F2F50BAF03511D08E496917E4B085709E1B193.png')}
#menu{width:34%;left:0;bottom:5px;display:flex;justify-content:space-around;align-items:center}
.native-button#shortcutMode{position:static;border:0!important;margin:0!important;width:var(--hud-slot)!important;height:var(--hud-slot)!important;background:transparent url('./native/bag.png') center/contain no-repeat!important}
#sideMenu .native-button{width:var(--hud-slot);height:var(--hud-slot)}
[data-art=friends]{background-image:url('./native/friends.png')!important}
#shortcutMode[aria-pressed=true]{filter:brightness(1.2);outline:2px solid #f7d050;outline-offset:-4px}
#minimap>button,#minimap #miniScene{height:auto;aspect-ratio:73/64;display:block}
#emptyShortcuts{left:35%;right:auto;width:36%;bottom:5px;justify-content:space-around;gap:4px;align-items:center}
#emptyShortcuts button{position:relative;flex:none;width:var(--hud-slot);height:var(--hud-slot);border:3px ridge #b8c5be;background:#152326b8;overflow:hidden;display:grid;place-items:center}
.actions{right:0;bottom:5px;width:28%;justify-content:space-around;gap:3px;align-items:center}
.potion{width:var(--hud-slot);height:var(--hud-slot);padding:0;overflow:hidden}.potion .native-item-icon{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.7)}
.attack{width:calc(var(--hud-slot)*1.2);height:calc(var(--hud-slot)*1.2)}
#sideMenu{bottom:calc(var(--hud-slot)*1.2 + 12px);gap:4px;right:6px}
#dpad{left:1%;top:42%;bottom:auto;width:min(18vw,24dvh,170px);height:min(18vw,24dvh,170px);display:grid;grid-template:repeat(3,1fr)/repeat(3,1fr);gap:0;border:0;border-radius:50%;background:transparent;transform:translateY(-10%);touch-action:none;overscroll-behavior:contain;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;cursor:grab;--stick-x:0px;--stick-y:0px}
#dpad button{border:0;border-radius:0;background:transparent;color:#f4f4dc;font-size:26px;text-shadow:1px 1px #697967;line-height:1;padding:0;min-height:0;touch-action:none;-webkit-tap-highlight-color:transparent}
#dpad button:first-child{grid-area:1/2}#dpad button:nth-child(2){grid-area:2/1}#dpad button:nth-child(3){grid-area:3/2}#dpad button:nth-child(4){grid-area:2/3}
#dpad .pad-ring{position:absolute;inset:0;pointer-events:none}
#dpad .pad-ring i{position:absolute;width:50%;height:50%;background:url('./native/apk/p40015.png') center/100% 100% no-repeat}
#dpad .pad-ring i:nth-child(1){left:0;top:0}
#dpad .pad-ring i:nth-child(2){left:0;top:50%;transform:scaleY(-1)}
#dpad .pad-ring i:nth-child(3){left:50%;top:50%;transform:scale(-1)}
#dpad .pad-ring i:nth-child(4){left:50%;top:0;transform:scaleX(-1)}
#dpad #padThumb{position:absolute;left:50%;top:50%;width:43.333%;height:43.333%;background:transparent url('./native/apk/p40019.png') center/contain no-repeat;border:0;border-radius:50%;box-shadow:none;transform:translate(calc(-50% + var(--stick-x)),calc(-50% + var(--stick-y)));transition:transform 100ms ease-out;z-index:1;cursor:grab;touch-action:none}
#dpad.dragging,#dpad.dragging #padThumb{cursor:grabbing}
#dpad.dragging #padThumb{transition:none}
#chat{left:19%;bottom:calc(var(--hud-slot)*1.2 + 12px);width:60%;min-width:0;background:#102b2299}
#messages{height:42px;padding:3px 6px;font-size:11px;line-height:1.25}#messages p{margin:0}
/* LD's world chat is a display overlay: taps and drags go to the map beneath it. */
#game #chat,#game #chat *{pointer-events:none;user-select:none}
#game #messages{overflow:hidden}
.native-skill-icon{display:grid;place-items:center;flex:none;overflow:hidden;image-rendering:pixelated}.native-skill-icon>span{display:block;background-repeat:no-repeat}
#emptyShortcuts .native-skill-icon{position:absolute;inset:0;margin:auto;max-width:100%;max-height:100%;pointer-events:none}
.skill-number{position:absolute;left:4px;bottom:1px;font-size:10px;color:#fff;text-shadow:1px 1px #000;z-index:1}
.cooldown-number{position:absolute;inset:0;display:grid;place-items:center;font-size:14px;font-weight:bold;z-index:2;color:#fff;text-shadow:1px 1px #000}
#emptyShortcuts button.cooling{background:#040608}#emptyShortcuts button.no-mana .native-skill-icon{filter:grayscale(1)}
.shortcut-label{font-size:11px;line-height:1.15;max-width:100%;white-space:normal}
.skill-row{align-items:center;gap:10px}.skill-row>div{min-width:0;flex:1}.skill-row strong{overflow-wrap:anywhere}.skill-row select{width:85px;flex:none;font-size:12px;padding:5px}.skill-row small{font-size:11px}.skill-row .native-item-icon{transform:none}
.menu-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid #8cac9c}.menu-grid button{border-radius:0;background:#133f3c;border:1px solid #769b8a;font-size:14px;min-height:50px}
@media(orientation:landscape) and (max-height:520px){#vitals{transform:scale(.85);transform-origin:top left}.connection{top:63px;font-size:9px}#minimap{width:90px}#miniScene,#minimap button{height:60px}#chatToggle{right:97px}#target{top:54px;max-width:calc(100% - 360px)}#messages{height:30px;font-size:10px}#dpad button{font-size:22px}#chat{bottom:calc(var(--hud-slot)*1.2 + 9px)}#toast{top:105px}.skill-row{padding:7px 0}#panelBody{padding:10px}}
@media(orientation:portrait){:root{--hud-slot:44px;--native-button:48px}#menu{width:200px;bottom:7px}#emptyShortcuts{width:190px;left:5px;bottom:69px}.actions{width:170px;right:4px;bottom:65px}.attack{width:64px;height:64px}#shortcutMode{right:6px;bottom:calc(65px + 3*52px);width:44px!important;height:44px!important}#sideMenu{bottom:140px}#dpad{top:auto;bottom:255px;left:8px;width:112px;height:112px;transform:none}#dpad button{font-size:23px}#chat{left:6px;bottom:149px;width:calc(100% - 72px)}#messages{height:49px;font-size:10px}#chatForm{max-height:26px}#target{top:125px;max-width:calc(100% - 20px)}.skill-row{gap:6px}.skill-row select{width:73px;font-size:11px}.skill-row .native-skill-icon{width:38px!important;height:38px!important}.menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(orientation:portrait) and (max-width:370px){:root{--hud-slot:38px;--native-button:43px}#menu{width:180px}#emptyShortcuts{left:4px;width:164px}.actions{right:3px;width:143px}.attack{width:55px;height:55px}.shortcut-label{font-size:10px}}

/* The LD companion row belongs to the upper-left status stack. It sits below
   the owner's HP/MP and inner-energy artwork; it does not float above the
   world actor. */
#game #companionHud{--vital-pixel:1.4px;--companion-pixel:var(--vital-pixel);--companion-frame:url('/client-recovery/assets/images-by-hash/A43DF87320C5E6DDFE62EC15076021B4BE86F5AF7ED65DB6061096FE4D2FFAAE.png');--companion-label:url('/client-recovery/assets/images-by-hash/0287CA67571F38EF6A1C7EF674867C5E45FD876E6372044464D12CA192CDD53A.png');--companion-level-sheet:url('/client-recovery/assets/images-by-hash/FBB1B9D8F444DB7E5DF0B81A0D53950CAD024E27366D88A1D934EF270EB8B0D4.png');position:absolute;left:0;top:calc(50 * var(--vital-pixel));width:calc(40 * var(--companion-pixel));height:calc(30 * var(--companion-pixel));padding:0;background:var(--companion-frame) 0 0/100% 100% no-repeat;pointer-events:auto;z-index:3;text-shadow:none;image-rendering:pixelated}
#companionHud #companionName{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;min-height:0;padding:0;border:0;border-radius:0;background:transparent;color:transparent;font-size:0;text-shadow:none;overflow:visible;z-index:3}
#companionHud #companionName::before{content:'';position:absolute;left:0;top:calc(2 * var(--companion-pixel));width:calc(36 * var(--companion-pixel));height:calc(18 * var(--companion-pixel));background:var(--companion-label) 0 0/100% 100% no-repeat;pointer-events:none;image-rendering:pixelated}
#companionHud #companionName:focus-visible{outline:1px solid #bedbd4;outline-offset:-1px}
#companionHud #companionLevel{position:absolute;left:calc(4 * var(--companion-pixel));top:calc(21 * var(--companion-pixel));display:flex;gap:0;width:max-content;height:calc(7 * var(--companion-pixel));color:#e3e9e5;font:calc(7 * var(--companion-pixel))/1 Tahoma,Arial,sans-serif;text-shadow:none;pointer-events:none;z-index:4}
#companionHud #companionLevel.companion-native-level>i{display:block;flex:none;width:calc(5 * var(--companion-pixel));height:calc(7 * var(--companion-pixel));background:var(--companion-level-sheet) calc(var(--digit) * -5 * var(--companion-pixel)) 0/calc(65 * var(--companion-pixel)) calc(7 * var(--companion-pixel)) no-repeat;image-rendering:pixelated}
#companionHud .companion-hud-meter{position:absolute;left:calc(17 * var(--companion-pixel));width:calc(19 * var(--companion-pixel));height:calc(3 * var(--companion-pixel));margin:0;border:0;background:transparent;overflow:hidden;pointer-events:none;z-index:1}
#companionHud .companion-hud-meter.hp{top:calc(8 * var(--companion-pixel))}
#companionHud .companion-hud-meter.mp{top:calc(14 * var(--companion-pixel))}
#companionHud .companion-hud-meter i{display:block;width:0;height:100%;background-repeat:no-repeat;background-size:calc(72 * var(--companion-pixel)) calc(4 * var(--companion-pixel));image-rendering:pixelated}
#companionHud .companion-hud-meter.hp i{background-image:var(--native-life-fill)}
#companionHud .companion-hud-meter.mp i{background-image:var(--native-mana-fill)}

/* R40010 is 110x40; the HP/MP strips occupy native (26,10)/(26,16), 72x4. */
#game #vitals{--vital-pixel:1.4px;left:0;top:0;width:calc(110 * var(--vital-pixel));height:calc(40 * var(--vital-pixel));padding:0;border:0;transform:none;background-size:100% 100%;background-position:0 0;background-repeat:no-repeat}
#vitals #roleName,#vitals .meter>span{position:absolute;width:1px;height:1px;max-width:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#vitals #schoolBadge{left:0;top:calc(6 * var(--vital-pixel));width:calc(24 * var(--vital-pixel));height:calc(24 * var(--vital-pixel));min-height:0;border:0;background:transparent;padding:0;font:12px Tahoma,Arial,sans-serif;line-height:1;color:#e3e9e5;text-shadow:1px 1px #102223;overflow:hidden}
#vitals #level{left:0;top:calc(31 * var(--vital-pixel));width:calc(24 * var(--vital-pixel));height:calc(8 * var(--vital-pixel));text-align:center;font:10px Tahoma,Arial,sans-serif;line-height:calc(8 * var(--vital-pixel));color:#e3e9e5}
#vitals .meter{position:absolute;left:calc(26 * var(--vital-pixel));width:calc(72 * var(--vital-pixel));height:calc(4 * var(--vital-pixel));margin:0;border:0;border-radius:0;background:#1b2224;overflow:hidden}
#vitals .meter.hp{top:calc(10 * var(--vital-pixel))}
#vitals .meter.mp{top:calc(16 * var(--vital-pixel))}
#vitals .meter i{background-repeat:no-repeat;background-size:100% 100%;image-rendering:pixelated;transition:none}
#vitals .meter.hp i{background-image:var(--native-life-fill)}
#vitals .meter.mp i{background-image:var(--native-mana-fill)}
/* GameScreen.drawShortCut: R40008, with a 326x2 EXP fill at native (17,6). */
#experienceHud{position:absolute;bottom:0;left:50%;transform:translateX(-50%);width:min(504px,100%);aspect-ratio:36/1;background-size:100% 100%;background-repeat:no-repeat;pointer-events:none;image-rendering:pixelated}
#experienceHud .meter.xp{position:absolute;left:4.722222%;top:60%;width:90.555556%;height:20%;margin:0;border:0;background:transparent;overflow:hidden}
#experienceHud .meter.xp i{background:#00ff00;transition:none}
/* ADB/root captures of LD 5555 show the thin green strip at the viewport
   bottom is the fixed native experience track. Mount activation itself is
   represented by the mounted actor and the shortcut icon's dark cooldown
   sweep; do not add a separate floating progress bar. */
/* Utils.drawMiniMap: R5520000 at 80x120, map viewport at (3,16), 73x64. */
#game #minimap{--mini-pixel:1.4px;right:0;top:0;width:calc(80 * var(--mini-pixel));height:calc(120 * var(--mini-pixel));padding:0;border:0;background-color:transparent;background-size:100% 100%;background-repeat:no-repeat;image-rendering:pixelated}
#game #minimap>button{position:absolute;left:calc(3 * var(--mini-pixel));top:calc(16 * var(--mini-pixel));width:calc(73 * var(--mini-pixel));height:calc(64 * var(--mini-pixel));padding:0;border:0;border-radius:0;background:transparent;aspect-ratio:auto;min-height:0}
#game #minimap #miniScene{width:100%;height:100%;aspect-ratio:auto}
#game #minimap #mapName{position:absolute;left:calc(3 * var(--mini-pixel));top:calc(86 * var(--mini-pixel));width:calc(73 * var(--mini-pixel));height:calc(18 * var(--mini-pixel));padding:0;border:0;background:#3f4a4bd9;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:calc(18 * var(--mini-pixel));font-size:14px}
#game #minimap #coordinates{position:absolute;left:calc(3 * var(--mini-pixel));top:calc(109 * var(--mini-pixel));width:calc(73 * var(--mini-pixel));height:calc(9 * var(--mini-pixel));line-height:calc(9 * var(--mini-pixel));font:9px Tahoma,Arial,sans-serif;padding:0}
#coordinates>span{position:absolute;top:0;line-height:calc(9 * var(--mini-pixel))}#coordinateX{left:calc(13 * var(--mini-pixel))}#coordinateY{left:calc(49 * var(--mini-pixel))}
@media(orientation:landscape) and (max-height:520px){#game #minimap{--mini-pixel:1.125px}}
