/* One shared header keeps the brand, balances and every menu entry aligned. */
.navigation-icon{object-fit:contain;image-rendering:auto!important;filter:drop-shadow(0 2px 2px #0006);flex-shrink:0}
.game-world{--header-top:max(6px,env(safe-area-inset-top));--header-height:112px;--hud-top:calc(var(--header-top) + var(--header-height) + 12px)}
.game-world:before{height:calc(var(--header-top) + var(--header-height));background:linear-gradient(#101c28,#101c28cc);border:0}
.game-header{position:absolute;z-index:5;top:var(--header-top);left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));height:var(--header-height);display:grid;grid-template-columns:200px minmax(0,1fr);align-items:center;gap:14px;padding:10px 12px;border:1px solid #3c5665;border-top-color:#a18859;border-radius:12px;background:linear-gradient(115deg,#1b303c,#10202c 65%);box-shadow:0 6px 18px #0004,inset 0 1px #eac47f08}
.header-overview{display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:10px;min-width:0;height:100%;padding-right:14px;border-right:1px solid #54708055}
.game-header .world-brand,.game-header .wallet{position:static;inset:auto;transform:none;margin:0;min-width:0;width:auto;height:auto}
.game-header .world-brand{display:flex;align-items:center;gap:7px;white-space:nowrap;text-shadow:none}
.game-header .world-brand>img{width:28px;height:28px}
.game-header .world-brand>div{font-size:20px;line-height:1.1;letter-spacing:.4px}
.game-header .wallet{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:0;border:0;background:none;box-shadow:none}
.game-header .wallet>span{display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:30px;padding:4px 6px;border:1px solid #40556380;border-radius:7px;background:#09172188;font:700 11px/1.1 'DM Sans',sans-serif;font-variant-numeric:tabular-nums;white-space:nowrap;color:#f3d693}
.game-header .wallet>span img{width:17px;height:17px;object-fit:contain}
.game-header .wallet-settings{display:flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:30px;min-height:30px;margin:0;padding:3px;border:1px solid #40556380;border-radius:7px;background:#132937;color:#eecb85}
.game-header .wallet-settings:hover{background:#274756;border-color:#8ca4ad}
.wallet-settings>.navigation-icon{width:24px;height:24px}
.game-header #toolbar{position:static;inset:auto;transform:none;min-width:0;max-width:none;width:100%;height:auto;margin:0;padding:0;display:flex;align-items:stretch;gap:10px;overflow:visible;border:0;border-radius:0;background:none;box-shadow:none}
#toolbar .navigation-group{min-width:0;position:relative;flex:var(--nav-count,1) 1 0}
#toolbar .navigation-group>div{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px}
.navigation-group-label{display:block;margin:0 0 5px 7px;color:#a6b8c1;font:700 9px/12px 'DM Sans',sans-serif;letter-spacing:1.4px}
.game-header button:focus-visible{outline:2px solid #f7c875;outline-offset:2px}
.vitals,.location-banner{top:var(--hud-top)}
@media(min-width:1101px){
 #toolbar .navigation-group:not(:first-child){border-left:1px solid #54708044;padding-left:10px}
 #toolbar .tool-button,#toolbar .play-button{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;max-width:none;min-width:0!important;min-height:70px;height:70px;gap:2px;margin:0!important;padding:4px;border:1px solid transparent;border-radius:8px;background:#20384655;color:#dde6e7;font:600 10px/1.25 'DM Sans',sans-serif;letter-spacing:0;text-align:center;white-space:normal;flex:none}
 #toolbar .tool-button>span{max-width:100%;min-height:25px;display:grid;place-content:center}
 #toolbar .navigation-icon{width:30px;height:30px}
 #toolbar .play-button{border-color:#dab26c;background:linear-gradient(135deg,#f3cc83,#dca952);color:#241b0e;box-shadow:inset 0 1px #ffeac380}
 #toolbar .play-button>span{font-size:14px;min-height:0}
 #toolbar .play-button small{display:none!important}
 #toolbar .tool-button[data-action=weekly-bosses]{background:#805f4024;border-color:#a38a5e44;color:#f1d5a4}
 #toolbar .tool-button[data-action=store]{color:#f3d190}
 #toolbar .tool-button:hover,#toolbar .tool-button[aria-expanded=true]{background:#294958;border-color:#708e9b}
 #toolbar .play-button:hover{background:#f5d38f}
 #toolbar .mobile-menu-toggle{display:none!important}
 #objectives-hud{top:var(--hud-top)}
 #captain-mode{top:var(--hud-top)}
}
@media(min-width:1101px) and (max-width:1599px){
 .game-world{--header-height:150px}
 .game-header{grid-template-columns:minmax(0,1fr);grid-template-rows:30px 1fr;gap:6px;padding:8px}
 .header-overview{flex-direction:row;align-items:center;justify-content:space-between;gap:12px;padding:0;border-right:0}
 .game-header .wallet{gap:6px}.game-header .wallet>span{min-width:82px}
 #toolbar .tool-button,#toolbar .play-button{height:78px;min-height:78px;padding:4px 2px;font-size:9px}
 .game-header #toolbar{padding-top:6px;border-top:1px solid #54708044}
}
@media(max-width:1100px){
 .game-world{--header-top:max(4px,env(safe-area-inset-top));--header-height:114px;--hud-top:calc(var(--header-top) + var(--header-height) + 8px)}
 .game-header{left:max(6px,env(safe-area-inset-left));right:max(6px,env(safe-area-inset-right));grid-template-columns:minmax(0,1fr);grid-template-rows:36px 56px;gap:6px;padding:6px;border-radius:10px}
 .header-overview{flex-direction:row;align-items:center;justify-content:space-between;gap:6px;padding:0;border:0}
 .game-header .world-brand{gap:5px}.game-header .world-brand>img{width:23px;height:23px}.game-header .world-brand>div{font-size:17px;letter-spacing:.2px}
 .game-header .wallet{gap:4px}.game-header .wallet>span{font-size:11px;padding:4px;min-height:32px}
 .game-header .wallet-settings{flex-basis:36px;width:36px;height:36px}
 .game-header #toolbar{display:grid;grid-template-columns:minmax(88px,1.2fr) repeat(3,minmax(0,1fr));gap:5px;height:56px}
 #toolbar .navigation-group,#toolbar .navigation-group>div{display:contents}
 .navigation-group-label{display:none}
 #toolbar .navigation-icon{display:block;width:27px;height:27px}
 #toolbar .tool-button{max-width:none;min-width:0!important;width:auto;height:56px;padding:4px 2px;margin:0!important;flex-direction:column;gap:3px}
 #toolbar .tool-button span{font:600 10px/1.2 'DM Sans',sans-serif;white-space:normal}
 #toolbar .play-button{min-width:0!important;min-height:56px;height:56px;margin:0!important;padding:5px;gap:4px;flex-direction:row}
 #toolbar .play-button .navigation-icon{display:block;width:28px;height:28px}
 #toolbar .play-button>span{font-size:18px}#toolbar .play-button small{display:none!important}
 #toolbar .tool-button[data-panel=character]{grid-column:2}#toolbar .tool-button[data-panel=backpack]{grid-column:3}#toolbar .mobile-menu-toggle{grid-column:4}#toolbar .play-button{grid-column:1}
}
@media(max-width:360px){
 .game-header .world-brand>div{font-size:14px}.game-header .world-brand>img{width:20px;height:20px}
 .game-header .wallet{gap:3px}.game-header .wallet>span{font-size:10px;padding:3px;gap:3px}.game-header .wallet>span img{width:14px;height:14px}
 .game-header .wallet-settings{flex-basis:32px;width:32px}
 #toolbar .tool-button span{font-size:9px}
}
@media(max-width:1100px) and (min-width:560px) and (max-height:540px) and (orientation:landscape){
 .game-world{--header-height:72px}
 .game-header{grid-template-columns:194px minmax(0,1fr);grid-template-rows:1fr;gap:10px}
 .header-overview{flex-direction:column;align-items:stretch;gap:2px;padding-right:10px;border-right:1px solid #54708055}
 .game-header .world-brand>img{width:21px;height:21px}.game-header .world-brand>div{font-size:16px}
 .game-header .wallet>span{min-height:28px;font-size:10px}.game-header .wallet-settings{height:28px;min-height:28px;flex-basis:30px;width:30px}
 .game-header #toolbar{height:52px}
 #toolbar .tool-button,#toolbar .play-button{height:52px;min-height:52px;flex-direction:row;gap:4px}
 #toolbar .tool-button .navigation-icon{width:24px;height:24px}
 .vitals,.location-banner{top:var(--hud-top)}
}
@media(max-width:1100px) and (max-height:540px) and (orientation:landscape){
 #captain-mode{top:var(--hud-top)}
 #objectives-hud{top:calc(var(--hud-top) + 60px)!important}
 #active-effects{top:calc(var(--hud-top) + 112px)!important}
}
.character-critical{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}.character-critical>span{padding:10px;border:1px solid #496272;border-radius:8px;background:#182d3b;font-size:9px;color:#b6c9d3}.character-critical strong{display:block;font-size:17px;color:#eecb85;margin-top:4px}
.npc-buy-row{display:grid!important;min-width:0;width:100%}.npc-buy-row .market-item-info{min-width:0}.npc-buy-row .market-price{width:auto!important;max-width:100%;white-space:normal}.npc-buy-row .market-price>strong{white-space:normal}
@media(max-width:700px){.market-menu .menu-columns{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px}.market-menu .category-list{display:flex;flex-direction:row;gap:6px;overflow-x:auto;max-width:100%;padding-bottom:8px}.market-menu .category-list>button{flex:0 0 auto;min-width:85px;width:auto}.market-menu .menu-tabs{display:flex;flex-wrap:wrap}.market-menu .menu-balance{margin-left:0}.market-menu .market-row{box-sizing:border-box}.market-menu .menu-main{width:100%}.market-menu .market-item-info p{overflow-wrap:anywhere}}
.navigation-directory{display:grid;gap:18px;font-family:'DM Sans',sans-serif}.navigation-directory section>h3{font:700 10px 'DM Sans',sans-serif;letter-spacing:1.5px;color:#baa378;margin:0 0 9px;padding:0 0 9px;border-bottom:1px solid #466074}.navigation-directory section>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.navigation-directory .menu-button{display:flex;gap:10px;align-items:center;text-align:left;min-width:0;min-height:67px;border:1px solid #385164;border-radius:10px;padding:9px;background:#122735;color:#e9dfc8;font:600 12px/1.35 'DM Sans',sans-serif}.navigation-directory .navigation-icon{width:36px;height:36px}.navigation-directory .menu-button:hover{border-color:#b99a5c;background:#213b49}
#bag-deliveries{margin-top:16px;border:1px solid #ad8b4d;border-radius:9px;padding:12px;background:#253030}#bag-deliveries summary{font-size:13px;font-weight:700;cursor:pointer;min-height:32px;color:#f3d092}#bag-deliveries p{font-size:11px;line-height:1.6;color:#b2c2c8}#bag-deliveries>div{display:flex;gap:9px;align-items:center;border-top:1px solid #516266;padding:9px 0}#bag-deliveries img{width:30px;height:30px}#bag-deliveries span{flex:1;font-size:11px}#bag-deliveries button{min-height:44px;font-size:11px}
.npc-buy-row{grid-template-columns:48px minmax(0,1fr) 170px;align-items:center}.npc-buy-row .market-price{min-width:0;gap:7px}.npc-quantity{display:grid;font:11px 'DM Sans',sans-serif;color:#bacbd3;gap:5px}.npc-quantity>div{display:grid;grid-template-columns:38px 1fr 38px;gap:4px}.npc-quantity input{min-width:0;width:100%;height:40px;background:#0a1824;color:#f0dcaf;border:1px solid #466273;border-radius:6px;text-align:center;font-size:15px}.npc-quantity button{border:1px solid #466273;border-radius:6px;background:#1b3343;color:#edc47b;font-size:19px;min-height:40px}.npc-buy-row [data-npc-warning]{color:#e7b677;font-size:11px}.npc-buy-row [data-npc-buy]{min-height:44px}.hero-purchase-confirm{text-align:center;max-width:550px;margin:auto}.hero-purchase-confirm>img{width:100px;height:110px;object-fit:contain;image-rendering:pixelated}.hero-purchase-confirm p{line-height:1.7}
.saga-purchase-option{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px;border:1px solid #997c46;border-radius:12px;background:linear-gradient(120deg,#44382655,#162d3a);margin:16px 0}.saga-purchase-option h3{margin:6px 0;color:#f6d48d}.saga-purchase-option small{font-size:10px;letter-spacing:1px}.saga-purchase-option p{font-size:12px;margin:6px 0}.saga-purchase-option button{flex-shrink:0}
.bestiary-overview{display:grid;grid-template-columns:1.4fr 1fr;gap:20px;padding:22px;border:1px solid #415e71;border-radius:14px;background:linear-gradient(130deg,#1b3741,#12232f);margin:16px 0 20px}.bestiary-overview small{font-size:10px;letter-spacing:1px;color:#d7b879}.bestiary-overview h3{font:700 23px/1.3 'DM Sans',sans-serif;color:#efdfb8;margin:10px 0}.bestiary-overview p{font-size:12px;line-height:1.7;color:#b6ccd4}.bestiary-totals{display:flex;flex-wrap:wrap;gap:18px}.bestiary-totals span{font-size:10px;color:#adbfca}.bestiary-totals b{display:block;font-size:20px;color:#fff1d1}.bestiary-mastery{border:1px solid #b490454f;border-radius:10px;background:#101f27;padding:16px}.bestiary-mastery.complete{border-color:#70b69d}.bestiary-mastery h4{margin:6px 0 10px;font-size:17px}.bestiary-mastery strong{font-size:13px;color:#ebc578;line-height:1.8}.bestiary-mastery progress{width:100%;height:6px;margin-top:14px;accent-color:#ddb55e}.bestiary-milestones{display:grid;gap:10px;margin-top:16px}.bestiary-milestones>section{border:1px solid #3c5668;border-radius:10px;padding:12px;background:#10222f}.bestiary-milestones header{display:flex;justify-content:space-between;gap:10px;font-size:12px}.bestiary-milestones header small{font-size:10px;color:#9bb6c2}.bestiary-milestones progress{width:100%;height:5px;margin:10px 0}.bestiary-reward{display:flex;align-items:center;gap:10px}.bestiary-reward>img{width:30px;height:30px}.bestiary-reward>span{flex:1;font-size:12px}.bestiary-reward small{display:block;font-size:10px;color:#9fbbbf;margin-top:3px}.bestiary-reward button{font-size:10px;min-height:40px}.bestiary-milestones .claimed{border-color:#54887577}
@media(max-width:700px){.navigation-directory section>div{grid-template-columns:1fr 1fr}.navigation-directory .menu-button{font-size:11px;gap:8px;padding:8px}.npc-buy-row{grid-template-columns:40px minmax(0,1fr)}.npc-buy-row .market-price{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:10px}.npc-buy-row [data-npc-warning]{grid-column:1/-1}.npc-quantity>div{grid-template-columns:44px minmax(0,1fr) 44px}.npc-quantity input,.npc-quantity button{min-height:44px}.npc-quantity input{font-size:16px}.bestiary-overview{grid-template-columns:1fr;padding:16px}.bestiary-overview h3{font-size:20px}.bestiary-reward{gap:6px}.bestiary-reward>span{font-size:11px}.bestiary-reward button{min-height:44px;padding:6px}.saga-purchase-option{flex-direction:column;align-items:stretch}}
@media(max-height:540px) and (orientation:landscape){#toolbar .navigation-icon{width:24px;height:24px}#toolbar .play-button>span{font-size:16px}}
/* Mastery: separate base attributes from conditional combat bonuses. */
.character-combat-bonuses{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:10px 0}.character-combat-bonuses>span{background:#122632;border:1px solid #355160;border-radius:7px;padding:9px;font-size:9px;line-height:1.5;color:#b2c9d3}.character-combat-bonuses>span:first-child{grid-column:1/-1}.character-combat-bonuses strong{display:block;color:#eacb85;font-size:17px;font-variant-numeric:tabular-nums}
.character-mastery{border:1px solid #405363;background:#0c1c29;border-radius:9px;padding:12px;margin:12px 0}.character-mastery.active{border-color:#5b8070;background:linear-gradient(130deg,#162e2d,#10202c)}.character-mastery header{display:flex;justify-content:space-between;gap:6px;font-size:9px;color:#a8c7bc;margin-bottom:9px}.character-mastery header b{font-weight:500}.character-mastery>strong{font-size:13px;color:#f1d390}.character-mastery p{font-size:12px;line-height:1.6;color:#deeadf;margin:6px 0}.character-mastery small{font-size:10px;color:#a0b8c5;line-height:1.6;display:block}
#mastery-content .mastery-explanation{font-size:13px;line-height:1.7;color:#b8cad4}#mastery-content .mastery-explanation b{color:#edd9ab}.mastery-current{padding:12px;margin:14px 0;border:1px solid #3c5260;border-radius:8px;background:#10212c;display:grid;gap:6px}.mastery-current.active{border-color:#5d8270;background:#19352f}.mastery-current>small{font-size:9px;letter-spacing:.7px;color:#abd1c6}.mastery-current>strong{font-size:13px;line-height:1.6;color:#efdaab}.mastery-current>span{font-size:11px;line-height:1.6;color:#a5bfcb}
:is(body.boss-combat) #objectives-hud{display:none}
@media(max-width:700px){
 body.boss-combat .location-banner{display:none}
 body.boss-combat .vital-xp-label,body.boss-combat .vital-row:has(.xp){display:none}
 body.boss-combat .vitals{padding:6px;min-height:0}
 body.boss-combat #weekly-hud{top:var(--hud-top,calc(122px + env(safe-area-inset-top)));right:8px;left:auto;bottom:auto;transform:none;max-width:calc(100vw - 230px);padding:6px;gap:4px;align-items:center}
 body.boss-combat #weekly-hud>div{min-width:0}
 body.boss-combat #weekly-hud strong{font-size:11px}
 body.boss-combat #weekly-hud span{font-size:9px}
 body.boss-combat #weekly-hud .menu-button{padding:4px;font-size:9px}
 body.boss-combat:has(#weekly-hud:not([hidden])) #target-hud,body.boss-combat:has(#raid-hud:not([hidden])) #target-hud{display:none}
 body.boss-combat #toast-stack{top:max(6px,env(safe-area-inset-top));bottom:auto;pointer-events:none}
 body.boss-combat #toast-stack>*:not(:last-child){display:none}
}

.bestiary-collect-all{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:18px;padding-top:16px;border-top:1px solid #486170}.bestiary-collect-all strong{display:block;font-size:13px;color:#f2d38c}.bestiary-collect-all small{display:block;font-size:11px;margin-top:6px;color:#aec4cf}.bestiary-collect-all button{min-height:44px;flex-shrink:0}@media(max-width:420px){.bestiary-collect-all button{width:100%}}
