/* Original POTCO atlas cards. Position the live meters inside GameGui's key. */
:root{--pirate-ink:#efe0bb;--pirate-gold:#c7b785;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
#pirate-status{position:fixed;left:10px;top:10px;width:360px;height:138px;padding:0;border:0;background:none;color:var(--pirate-ink);font:14px Georgia,serif;text-shadow:1px 2px 2px #000;z-index:24;cursor:pointer;text-align:left;filter:drop-shadow(0 2px 3px #0008)}
#pirate-status .status-frame{position:absolute;left:0;top:0;width:100%;height:auto;pointer-events:none}
.notoriety-ring{position:absolute;left:2.3%;top:9px;width:26.5%;aspect-ratio:1;background:conic-gradient(from 180deg,#ab1821 var(--xp,0%),#292720 0);mask:url(assets/gui/hud/dial.png) center/contain no-repeat}
#pirate-status span,#pirate-status strong{position:absolute;white-space:nowrap}
.notoriety-caption{left:0;top:39px;width:32%;text-align:center;font-size:12px;color:#d2bc8d}
#pirate-level{left:0;top:50px;width:32%;text-align:center;font-size:29px;line-height:31px;font-weight:normal}
#pirate-xp{left:0;top:86px;width:32%;text-align:center;font-size:11px}
#pirate-name{left:34%;top:9px;max-width:62%;overflow:hidden;text-overflow:ellipsis;font-size:16px;font-weight:normal}
#pirate-status progress{position:absolute;appearance:none;border:0;background:#070806;height:10px;width:55.7%;left:30%;margin:0;padding:0;color:#489033}
#pirate-status progress::-webkit-progress-bar{background:#080b05}
#pirate-status progress::-webkit-progress-value{background:linear-gradient(#79b249,#38781c);transition:width .18s}
#pirate-health{top:33px}#pirate-mojo{top:72px}
#pirate-status #pirate-mojo::-webkit-progress-value{background:linear-gradient(#b6a7e4,#7965ad)}
.health-caption{left:42%;top:45px}.mojo-caption{left:42%;top:84px}
#pirate-health-text,#pirate-mojo-text{right:11%;font-size:12px}#pirate-health-text{top:46px}#pirate-mojo-text{top:85px}
#pirate-status #pirate-weapon{top:117px;left:8%;font-size:11px;color:#d2c697}
#pirate-status.low-health #pirate-health::-webkit-progress-value{background:#b43228}
#reputation-gain{position:fixed;left:42px;top:140px;z-index:50;color:#ffe49c;font:18px Georgia;text-shadow:0 2px 3px #000;pointer-events:none}
#pirate-tools{position:fixed;right:16px;top:12px;display:flex;gap:8px;z-index:34}
#pirate-tools button{position:relative;width:52px;height:54px;padding:5px;border:0;background:url(assets/gui/hud/button.png) center/100% 100% no-repeat;color:var(--pirate-ink);cursor:pointer;filter:drop-shadow(0 2px 3px #0008)}
#pirate-tools button:hover{background-image:url(assets/gui/hud/button_over.png)}
#pirate-tools img{width:100%;height:100%;object-fit:contain}#pirate-tools span{position:absolute;top:100%;left:50%;transform:translateX(-50%);display:none;white-space:nowrap;padding:6px 10px;background:#22251bf2;color:#ebd6a3;border:1px solid #8a825c;font:13px Georgia}
#pirate-tools button:hover span,#pirate-tools button:focus-visible span{display:block}
.native-hud button:focus-visible{outline:2px solid #ffdf8e;outline-offset:3px}
.native-hud .town-toolbar,.native-hud #hint,.native-hud #island-switcher{display:none!important}
.native-hud #diagnostics{display:none;top:auto;bottom:6px;left:8px;z-index:80;padding:8px;background:#151810eb;flex-wrap:wrap;max-width:calc(100vw - 32px)}
.native-hud.show-diagnostics #diagnostics,.native-hud.mobile-diagnostics #diagnostics{display:flex}
.native-hud #hud{top:auto;bottom:65px;z-index:80;max-height:55vh;overflow:auto}
.native-hud #cross{opacity:.35}
/* Replace the additional floating blue cards with the original scroll/button art. */
.native-hud #adventure-guide,.native-hud #quest-tracker{left:20px;max-width:260px;width:260px;box-sizing:border-box;padding:11px 19px;border:0;border-radius:0;box-shadow:none;background:url(assets/gui/hud/quest_scroll.png) center/100% 100% no-repeat;color:#3d2c12;font:13px/1.4 Georgia;text-shadow:none;filter:drop-shadow(0 3px 3px #0005)}
.native-hud #adventure-guide{top:172px;min-height:52px}
.native-hud #quest-tracker{top:237px;min-height:48px;background:none;color:#ffedb8;text-shadow:1px 2px 3px #000;padding:5px 10px 5px 24px;border-left:2px solid #bfac6d}
.native-hud #quest-tracker:before{content:'◆';position:absolute;left:6px;top:7px;color:#e6c369;font-size:11px}
.native-hud #quest-tracker[data-bearing]:before{content:'▲';transform:rotate(var(--quest-bearing,0rad));transform-origin:50% 50%;font-size:16px;top:10px}
.native-hud #npc-talk{border:0;border-radius:0;background:url(assets/gui/hud/quest_scroll.png) center/100% 100% no-repeat;color:#342710;padding:15px 30px;box-shadow:none;filter:drop-shadow(0 3px 4px #0008);bottom:112px}
.native-hud #adventure-target{top:25px;left:50%;width:220px;transform:translateX(-50%);background:none;border:0;box-shadow:none;padding:8px 15px;text-shadow:1px 2px 3px #000;color:#f6d7a5}
.native-hud #adventure-target progress{height:13px;appearance:none;border:3px ridge #99916b;border-radius:0;background:#1c1711}
.native-hud #adventure-target progress::-webkit-progress-bar{background:#1c1711}.native-hud #adventure-target progress::-webkit-progress-value{background:#992c26}
.native-hud #adventure-target strong{display:block;padding-right:25px}.native-hud #adventure-target button{position:absolute;right:0;top:0;width:44px;height:44px;border:0;background:none;color:#e8cf9d;font:24px Georgia;pointer-events:auto;cursor:pointer;text-shadow:1px 2px #000}
.native-hud #combat-actions{left:50%;right:auto;bottom:22px;transform:translateX(-50%);gap:12px}
.native-hud #combat-actions button{position:relative;display:block;min-width:0;min-height:0!important;width:65px;height:65px;border:0;border-radius:0;padding:12px;background:url(assets/gui/hud/skill_base.png) center/contain no-repeat!important;color:#f4deac;font:12px Georgia!important;filter:drop-shadow(0 3px 4px #000a)}
.native-hud #combat-actions img{width:100%;height:100%;object-fit:contain;pointer-events:none}
.native-hud #combat-actions span{position:absolute;top:100%;left:0;width:100%;text-align:center;font:12px Georgia;text-shadow:1px 2px 3px #000}
.native-hud #combat-actions kbd{position:absolute;left:4px;top:0;padding:1px 4px;color:#ffe9b5;background:#282a1c;border:1px solid #a49972;border-radius:50%;font:12px Georgia}
.native-hud #combat-actions small{position:absolute;right:3px;bottom:0;font:15px Georgia;color:#fff0b9;text-shadow:1px 1px #000}
.native-hud #combat-attack{width:76px!important;height:76px!important}
.native-hud #adventure-message{border:0;border-radius:0;box-shadow:none;background:linear-gradient(90deg,transparent,#1d221bdd 15%,#1d221bdd 85%,transparent);color:#ffe5a6;bottom:124px;text-shadow:1px 2px #000}
.native-hud #adventure-message{width:max-content;box-sizing:border-box}
.native-hud.touch-device:has(#adventure-message:not([hidden])) #mobile-look-hint{visibility:hidden}
/* A common, native-art panel treatment for journal, merchants, social and menu. */
.native-hud #npc-shop,.native-hud #adventure-recovery,.native-hud #mobile-settings{background:#282d20;border:13px solid transparent;border-image:url(assets/gui/hud/button.png) 28 fill stretch;border-radius:0;color:#efdfb6;box-shadow:0 10px 45px #0009;font:16px/1.5 Georgia,serif;scrollbar-color:#a29569 #25291b;padding:20px}
.native-hud #npc-shop{right:90px;top:80px;max-height:calc(100dvh - 104px);width:min(480px,calc(100vw - 110px))}
.native-hud #npc-shop header{position:sticky;top:-20px;padding:9px 9px 9px 18px;border:0;background:#303326 url(assets/gui/title_bar.png) center/100% 100% no-repeat;margin:-8px -8px 18px;min-height:45px}
.native-hud #npc-shop h2{font-size:26px;font-weight:normal;text-shadow:1px 2px 2px #000;color:#fff0c4;line-height:1.2}
.native-hud #npc-shop h3{font-weight:normal;color:#f7e1aa}
.native-hud #npc-shop button,.native-hud .adventure-shop button,.native-hud #adventure-recovery button,.native-hud #mobile-settings button{background:url(assets/gui/hud/button.png) center/100% 100% no-repeat;border:0;border-radius:0;color:#f2dfae;text-shadow:1px 1px 2px #000;box-shadow:none;font-family:Georgia,serif;cursor:pointer}
.native-hud #npc-shop button:hover,.native-hud #mobile-settings button:hover{background-image:url(assets/gui/hud/button_over.png)}
.native-hud #npc-shop .town-close{background:none;min-width:44px;width:44px;font-size:28px;align-self:start}
.native-hud #npc-shop .town-eyebrow{color:#c5ba8d;font:12px Georgia;letter-spacing:1px}
.native-hud #npc-shop .quest-card,.native-hud #npc-shop .adventure-shop article{border:0;border-radius:0;border-top:1px solid #bcae7355;background:none;padding:14px 0}
.native-hud #npc-shop .shop-item{background:#181c1455;border:1px solid #aba06b44;border-radius:0}
.native-hud #npc-shop .shop-item p,.native-hud #npc-shop .quest-reward{color:#d1c6a3;font:13px/1.4 Georgia}
.native-hud #npc-shop .port-cards button,.native-hud #npc-shop .port-directory button{background:url(assets/gui/hud/button.png) center/100% 100% no-repeat;color:#f2dfae;border:0}
.native-hud #npc-shop input,.native-hud #npc-shop select{background:#1c2117;color:#f0dfb5;border:1px solid #9c9267;border-radius:0;font:16px Georgia}
.native-hud #npc-shop .social-tabs{display:flex;gap:10px}.native-hud #npc-shop .social-tabs button{width:50%}.native-hud #npc-shop [aria-pressed=true]{background-image:url(assets/gui/hud/button_over.png)}
.native-hud #npc-shop .feature-note{font:13px/1.5 Georgia;color:#c5bea5;border-top:1px solid #9f936044;padding-top:16px}
.native-hud #npc-shop .pirate-row{border-bottom:1px solid #b7ab7855;padding:8px 0}
.native-hud #pirate-stat-sheet progress{display:block;width:100%;height:14px;accent-color:#a13830}.native-hud #pirate-stat-sheet .stat-heading{color:#f5d684;font-size:21px;margin-top:22px}
.native-hud #pirate-stat-sheet progress{appearance:none;border:2px ridge #998f6a;border-radius:0;background:#14180e}
.native-hud #pirate-stat-sheet progress::-webkit-progress-bar{background:#14180e}.native-hud #pirate-stat-sheet progress::-webkit-progress-value{background:linear-gradient(#b05242,#82261f)}
.menu-quality{display:block;margin:16px 0}.menu-quality select{display:block;width:100%;min-height:44px;padding:8px;margin-top:8px}
.native-hud #chesttray button{border:0;background:none;padding:0}.native-hud #chesttray button:disabled{cursor:default}
body:has(#npc-shop:not([hidden])) #pirate-tools,body:has(#npc-shop:not([hidden])) #quest-tracker,body:has(#chestpanel:not([hidden])) #pirate-tools{visibility:hidden}
.pirate-defeated #pirate-tools{visibility:hidden}
/* Keep the native silhouette on touch screens, with generous tap targets. */
.touch-device #pirate-status{left:8px;top:calc(8px + var(--safe-top));transform:scale(.76);transform-origin:top left}
.touch-device #pirate-tools{top:calc(122px + var(--safe-top));right:8px;gap:6px}
.touch-device #pirate-tools button{width:44px;height:46px}.touch-device #pirate-tools span{display:none!important}
.native-hud.touch-device #mobile-port,.native-hud.touch-device #mobile-menu{display:none}
.native-hud.touch-device #mobile-inventory{position:fixed;top:calc(12px + var(--safe-top));right:8px;width:68px;height:65px;min-height:44px;padding:0;background:none;border:0}
.native-hud.touch-device #mobile-inventory img{width:68px;height:60px}.native-hud.touch-device #mobile-inventory span{display:none}
.native-hud.touch-device #mobile-look-hint{top:calc(290px + var(--safe-top));font:11px Georgia;background:#23271c99}
.native-hud.touch-device #adventure-guide{top:calc(182px + var(--safe-top));left:12px;width:235px;max-width:235px;font-size:12px;padding:10px 17px;min-height:46px}
.native-hud.touch-device #quest-tracker{top:calc(242px + var(--safe-top));left:12px;max-width:240px;font-size:12px}
.native-hud.touch-device #combat-actions{left:auto;right:16px;bottom:calc(136px + var(--safe-bottom));transform:none;gap:7px}
.native-hud.touch-device #combat-actions button{width:51px;height:51px;padding:10px}.native-hud.touch-device #combat-attack{width:66px!important;height:66px!important}.native-hud.touch-device #combat-actions span{font-size:11px}
.native-hud.touch-device #adventure-target{top:calc(182px + var(--safe-top));left:50%;right:auto;transform:translateX(-50%);width:200px;font-size:13px}
.native-hud.touch-device #adventure-message{bottom:calc(240px + var(--safe-bottom));max-width:80vw}
.native-hud.touch-device #npc-talk{bottom:calc(218px + var(--safe-bottom));max-width:90vw;min-height:48px}
.native-hud.touch-device #npc-shop{inset:calc(12px + var(--safe-top)) 12px calc(12px + var(--safe-bottom));width:auto;max-height:none;padding:15px}
.native-hud.touch-device #npc-shop header{top:-15px}.native-hud.touch-device #npc-shop h2{font-size:23px}
.native-hud.touch-device #mobile-pad button,.native-hud.touch-device #mobile-run{background:url(assets/gui/hud/button.png) center/100% 100% no-repeat;border:0;border-radius:0;color:#f2dfae}
.native-hud.touch-device #mobile-jump{background:url(assets/gui/hud/skill_base.png) center/100% 100% no-repeat;border:0;border-radius:0;color:#f2dfae}
.native-hud.touch-device #mobile-jump{box-shadow:none;filter:drop-shadow(0 2px 3px #0008)}
.native-hud.touch-device #chestpanel{box-sizing:border-box;background:#282d20;border:9px solid transparent;border-image:url(assets/gui/hud/button.png) 28 fill stretch;border-radius:0}
.native-hud.touch-device .chest-tabs button{background:url(assets/gui/hud/button.png) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none}
.native-hud.touch-device .chest-tabs button[aria-pressed=true]{background-image:url(assets/gui/hud/button_over.png)}
.native-hud.touch-device.mobile-modal #pirate-status{visibility:hidden}
.native-hud.touch-device #mobile-pad .pressed,.native-hud.touch-device #mobile-run[aria-pressed=true]{background-image:url(assets/gui/hud/button_over.png)}
.native-hud.touch-device #reputation-gain{left:26px;top:115px;font-size:14px}
@media(max-height:550px) and (orientation:landscape){
 .touch-device #pirate-status{transform:scale(.7)}
 .touch-device #pirate-tools{top:calc(10px + var(--safe-top));right:12px}
 .native-hud.touch-device #mobile-inventory{top:calc(68px + var(--safe-top));right:8px}
 .native-hud.touch-device #adventure-guide{top:calc(108px + var(--safe-top));width:235px;max-width:235px;font-size:11px;min-height:38px;padding:8px 16px}
 .native-hud.touch-device #quest-tracker{top:calc(152px + var(--safe-top));max-width:235px;font-size:11px;min-height:30px}
 .native-hud.touch-device #adventure-target{top:calc(63px + var(--safe-top));left:auto;right:83px;transform:none;width:180px}
 .native-hud.touch-device #npc-talk{bottom:calc(18px + var(--safe-bottom));max-width:calc(100vw - 390px);font-size:13px}
 .native-hud.touch-device #npc-shop{left:auto;width:min(520px,65vw)}
 .native-hud.touch-device #reputation-gain{top:92px}
}
@media(orientation:portrait){
 .native-hud.touch-device:has(#adventure-target:not([hidden])) #adventure-guide,.native-hud.touch-device:has(#adventure-target:not([hidden])) #mobile-look-hint{visibility:hidden}
 .native-hud.touch-device:has(#adventure-target:not([hidden])) #quest-tracker{top:calc(268px + var(--safe-top))}
}
@media(max-width:360px){.touch-device #pirate-status{transform:scale(.66)}.native-hud.touch-device #mobile-inventory{width:55px}.native-hud.touch-device #mobile-inventory img{width:55px}}
@media(prefers-reduced-motion:reduce){#pirate-status progress::-webkit-progress-value{transition:none}}
