/* Work revision 2 skins. Data, text, inputs and inventories remain live DOM. */
body.equipment-xp.playing #hud-shop-controls{grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important}
body.equipment-xp.playing #hud-shop-controls #hud-level{grid-area:1/1!important;max-width:none!important;margin:0!important}
body.equipment-xp.playing #hud-shop-controls #xp-btn{grid-area:2/1!important;max-width:none!important;width:100%!important;margin:0!important}
body.equipment-xp.playing #hud-shop-controls #reroll-btn{grid-area:3/1!important;max-width:none!important;width:100%!important;margin:0!important}
body.equipment-xp.playing #dock-start #battle-btn{min-width:0!important;max-width:none!important;width:100%!important;grid-area:auto!important;box-sizing:border-box!important}
body.equipment-xp.playing #dock-toolbar #hud-shop-gold,body.equipment-xp.playing #dock-toolbar #lock-btn{transform:none!important;translate:none!important;margin:0!important;inset:auto!important;grid-area:auto!important}
body.equipment-xp.playing #shared-shop-dock .shop-area{min-height:0!important}
body.equipment-xp.playing #hud-bottom{position:fixed!important;inset:auto 0 0!important;height:0!important;padding:0!important;overflow:visible!important;transform:none!important}
body.equipment-xp.playing #shared-shop-dock{position:fixed!important;left:50%!important;bottom:max(8px,env(safe-area-inset-bottom))!important;top:auto!important;transform:translateX(-50%)!important;width:var(--dock-width)!important;height:var(--dock-height)!important;min-height:0!important;padding:0!important;margin:0!important;border:0!important;display:block!important;background:var(--dock-skin) center/100% 100% no-repeat!important;overflow:visible!important;pointer-events:none}
body.equipment-xp #shared-shop-dock>*,body.equipment-xp #equipment-workspace{pointer-events:auto}
body.equipment-xp #shared-shop-dock>.footer-head,body.equipment-xp #shared-shop-dock>.bench-area,body.equipment-xp #hud-shop-toggle,body.equipment-xp #hud-hint,body.equipment-xp #mobile-selection,body.equipment-xp #hud-items,body.equipment-xp #mobile-bag-seat{display:none!important}
body.equipment-xp #hud-shop-controls{position:absolute!important;left:0!important;bottom:0!important;top:auto!important;width:var(--rail-width)!important;height:152px!important;display:grid!important;grid-template-rows:52px 44px 44px!important;gap:4px!important;padding:4px 6px!important;box-sizing:border-box;transform:none!important;background:none!important;border:0!important;border-radius:0!important;overflow:hidden!important}
body.equipment-xp #hud-shop-controls>.shop-sidebar,body.equipment-xp #hud-shop-actions{display:none!important}
body.equipment-xp #hud-level{display:flex!important;position:relative!important;flex-direction:column!important;min-width:0!important;width:100%!important;height:52px!important;padding:0!important;background:none!important;border:0!important;gap:0!important}
body.equipment-xp #hud-level-title{display:flex!important;align-items:center!important;height:26px!important;gap:4px!important;padding:0!important}
body.equipment-xp #level-label{font-size:23px!important;font-weight:700!important;color:#e7f7f9;line-height:26px!important;white-space:nowrap}
body.equipment-xp #level-label::before{content:'';display:inline-block;width:24px;height:24px;vertical-align:middle;margin-right:5px;background:url('assets/equipment-xp/ui/level-emblem.webp') center/contain no-repeat}
body.equipment-xp #xp-label{position:absolute!important;left:0;top:36px;font-size:9px!important;line-height:12px!important;white-space:nowrap}
body.equipment-xp .hud-xp-track{height:9px!important;min-height:9px!important;width:100%!important;display:block!important;background:url('assets/equipment-xp/ui/xp-track.webp') center/100% 100%;padding:1px!important}
body.equipment-xp .hud-xp-track .xp-progress{margin:0!important;height:7px!important;width:100%!important;border:0!important;background:transparent!important}
body.equipment-xp #xp-bar{height:7px!important;background-image:repeating-linear-gradient(90deg,transparent 0,transparent 8px,#142e3f 8px,#142e3f 9px),url('assets/equipment-xp/ui/xp-fill.webp')!important;background-size:auto,100% 100%!important}
body.equipment-xp #dock-xp-remaining{position:absolute;right:0;top:36px;font-size:9px;line-height:12px;color:#a8c9d1}
body.equipment-xp #xp-btn,body.equipment-xp #reroll-btn{position:relative!important;inset:auto!important;width:100%!important;height:44px!important;min-height:44px!important;padding:3px 6px!important;border:0!important;border-radius:0!important;display:flex!important;align-items:center;justify-content:space-between;gap:3px;font-size:12px!important;background:url('assets/equipment-xp/ui/button-default.webp') center/100% 100% no-repeat!important;color:#e9f7ff!important}
body.equipment-xp #reroll-btn{background-image:url('assets/equipment-xp/ui/button-refresh.webp')!important}
body.equipment-xp #xp-btn img,body.equipment-xp #reroll-btn img{width:17px!important;height:17px!important;object-fit:contain}
body.equipment-xp #xp-btn[data-state=insufficient],body.equipment-xp #reroll-btn[data-state=insufficient]{background-image:url('assets/equipment-xp/ui/button-insufficient.webp')!important}
body.equipment-xp #xp-btn:disabled,body.equipment-xp #reroll-btn:disabled{opacity:.65}
body.equipment-xp #xp-btn:focus-visible,body.equipment-xp #reroll-btn:focus-visible{outline:2px solid #d6ffef;outline-offset:-2px;background-image:url('assets/equipment-xp/ui/button-focus.webp')!important}
body.equipment-xp #xp-btn:active,body.equipment-xp #reroll-btn:active{background-image:url('assets/equipment-xp/ui/button-pressed.webp')!important}
body.equipment-xp #shared-shop-dock>.shop-area{position:absolute!important;left:var(--rail-width)!important;right:0!important;bottom:0!important;top:auto!important;width:auto!important;height:96px!important;display:block!important;padding:4px 5px!important;border:0!important;background:none!important;overflow:hidden!important;box-sizing:border-box}
body.equipment-xp #shop-cards{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:4px!important;height:100%!important;width:100%!important;overflow:hidden!important;padding:0!important}
body.equipment-xp .shop-card{height:100%!important;min-width:0!important;min-height:44px!important;max-width:none!important;border-radius:5px!important;background-color:#102c3a!important;overflow:hidden!important;padding:0!important;touch-action:pan-x}
body.equipment-xp .shop-top{height:calc(100% - 22px)!important;min-height:0!important;padding:0!important}.equipment-xp .shop-top .poke-img{max-width:80%!important;max-height:95%!important}
body.equipment-xp .shop-name{font-size:12px!important;padding:1px 5px!important;height:20px!important;text-align:left!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.equipment-xp .shop-meta,body.equipment-xp .shop-price,body.equipment-xp #shop-odds{display:none!important}
body.equipment-xp .shop-info,body.equipment-xp .shop-advice-badge{right:0!important;top:0!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
body.equipment-xp .shop-cost{right:3px!important;bottom:0!important;top:auto!important;font-size:11px!important}.equipment-xp .merge-hint{font-size:9px!important}
body.equipment-xp #dock-bench-row{position:absolute;left:calc(var(--rail-width) + 8px);right:174px;top:6px;height:44px}
body.equipment-xp #bench{position:absolute!important;inset:0 110px 0 0!important;width:auto!important;height:44px!important;display:grid!important;grid-template-columns:repeat(9,minmax(0,1fr))!important;gap:3px!important;padding:0!important;border:0!important;background:none!important;overflow:visible!important}
body.equipment-xp #bench .bench-slot{width:100%!important;min-width:0!important;height:44px!important;min-height:44px!important;padding:0!important;box-sizing:border-box;background:#14313f!important}
body.equipment-xp #bench .poke-img{max-height:38px!important;max-width:95%!important}body.equipment-xp #bench .bench-name{display:none!important}
body.equipment-xp #dock-start{position:absolute;right:0;top:0;width:100px;height:44px}
body.equipment-xp #battle-btn{position:static!important;width:100%!important;height:44px!important;min-height:44px!important;padding:2px!important;background:url('assets/equipment-xp/ui/start-button.webp') center/100% 100% no-repeat!important;border:0!important;font-size:14px!important}
body.equipment-xp #hud-deploy-count{position:absolute!important;bottom:47px!important;top:auto!important;left:0!important;width:100%!important;height:24px!important;min-height:0!important;padding:0 3px!important;border-radius:4px!important;box-sizing:border-box;font-size:12px!important;display:flex!important;justify-content:center;align-items:center;gap:4px}
body.equipment-xp #hud-deploy-count .deploy-slots{display:none!important}
body.equipment-xp #dock-toolbar{position:absolute;right:6px;top:6px;display:flex;align-items:center;gap:4px;height:44px;width:160px}
body.equipment-xp #dock-toolbar>button,body.equipment-xp #lock-btn{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:4px!important;position:static!important;border:1px solid #63838e;background:#183b4c;border-radius:4px}
body.equipment-xp #dock-toolbar>button img{width:32px;height:32px;object-fit:contain}
body.equipment-xp #hud-shop-gold{position:static!important;min-width:58px!important;width:58px!important;height:44px!important;font-size:13px!important;padding:2px!important;background:none!important;display:flex!important;align-items:center;justify-content:center}
body.equipment-xp #hud-shop-gold .hud-coin{width:16px;height:16px}
body.equipment-xp #equipment-workspace{position:fixed!important;display:flex!important;flex-direction:column;padding:4px!important;margin:0!important;border:0!important;border-radius:0!important;background:var(--drawer-skin) center/100% 100% no-repeat!important;box-shadow:none!important;overflow:hidden!important;z-index:56;gap:0!important;box-sizing:border-box;transition:opacity 120ms}
body.equipment-xp #equipment-workspace[hidden]{display:none!important}
body.equipment-xp #bc-heading{position:static!important;display:flex!important;flex:0 0 44px;height:44px!important;min-height:44px!important;align-items:center;padding:0!important;overflow:hidden;gap:0;border:0!important}
body.equipment-xp #bc-heading button{width:44px;min-width:44px;height:44px;padding:5px;background:transparent;border:0;color:#dcf4f6;border-radius:4px}
body.equipment-xp #bc-heading button img{width:30px;height:30px;object-fit:contain}
body.equipment-xp #bc-heading [data-dock=grip]{cursor:grab;touch-action:none;font-size:12px;overflow:hidden;text-overflow:ellipsis}
body.equipment-xp #bc-content{position:relative!important;flex:1;min-height:0!important;width:100%!important;max-height:none!important;height:auto!important;overflow:auto!important;overscroll-behavior:contain;padding:0!important;background:none!important;scrollbar-width:thin;scrollbar-color:#5a8190 transparent;touch-action:pan-y}
body.equipment-xp #bc-actions{position:static!important;flex:0 0 30px!important;min-height:0!important;height:30px!important;display:flex!important;align-items:center;justify-content:space-between;padding:0!important;gap:2px!important;font-size:10px;color:#b3d1da;overflow:hidden;border:0!important}
body.equipment-xp #bc-actions:has(button){flex-basis:44px!important;height:44px!important}
body.equipment-xp #bc-actions>span{min-width:0;max-height:28px;overflow:hidden}
body.equipment-xp #bc-actions button,body.equipment-xp #bc-content button:not(.dock-slot){min-height:44px;min-width:44px;padding:4px;border:1px solid #658492;background:#173b49;color:#e6f6ff;font-size:11px;border-radius:4px}
body.equipment-xp #bc-actions button img{width:24px;height:24px}
body.equipment-xp .dock-grid,body.equipment-xp #item-inventory.dock-grid{display:grid!important;grid-template-columns:repeat(3,44px)!important;grid-auto-rows:44px!important;gap:2px!important;padding:0!important;width:100%!important;height:auto!important;max-height:none!important;overflow:visible!important}
body.equipment-xp .dock-slot{position:relative;min-width:44px!important;width:44px!important;height:44px!important;min-height:44px!important;padding:5px!important;border:1px solid #7696a4!important;border-radius:7px;background:#173644;box-shadow:inset 0 0 0 2px #2f5665;touch-action:pan-y}
body.equipment-xp .dock-slot img{max-width:30px!important;max-height:30px!important;image-rendering:pixelated;object-fit:contain}
body.equipment-xp .dock-slot b{position:absolute;right:1px;bottom:0;background:#0c2534;color:#edf8fc;font-size:10px;line-height:12px;min-width:12px;border-radius:2px}
body.equipment-xp .dock-slot.craft-ready{border:2px solid #ffe078!important;box-shadow:inset 0 0 0 1px #fff2b7,0 0 5px #d8ac4666;background-image:url('assets/equipment-xp/ui/craft-ready.webp');background-size:100% 100%}
body.equipment-xp .dock-slot:focus-visible,body.equipment-xp [data-dock]:focus-visible{outline:2px solid #adffdd;outline-offset:-2px}
body.equipment-xp .dock-protected{position:absolute;right:1px;top:0;color:#bed4f6;font-size:9px}
body.equipment-xp .dock-category select{width:100%;height:44px;font-size:12px;background:#153542;color:#def3ff;border:1px solid #6d8f98;border-radius:4px}
body.equipment-xp .dock-unit-slots{display:flex;gap:2px;margin-bottom:4px}
body.equipment-xp .dock-description{font-size:12px;line-height:1.4;overflow-wrap:anywhere}.equipment-xp .dock-description>img{float:left;width:32px;height:32px;image-rendering:pixelated}
body.equipment-xp #bc-content p{font-size:12px;margin:3px 0;line-height:1.4}.equipment-xp #bc-content small{font-size:10px;color:#b9d4db}
body.equipment-xp .dock-materials{display:flex;gap:4px;flex-wrap:wrap}.equipment-xp .dock-materials span{display:flex;flex-direction:column;align-items:center}.equipment-xp .dock-materials img{width:28px;height:28px;image-rendering:pixelated}
body.equipment-xp #dock-quantity{width:70px;height:44px;background:#112e3c;border:1px solid #86a6b0;color:white}
.dock-craft-fx{position:fixed;width:92px;height:92px;pointer-events:none;z-index:180;image-rendering:auto}
body.equipment-xp #dock-unitbar{display:none}
@media(max-width:1100px) and (orientation:landscape){
 body.equipment-xp #hud-shop-controls{height:148px!important;grid-template-rows:48px 44px 44px!important}
 body.equipment-xp #shared-shop-dock>.shop-area{height:52px!important}
 body.equipment-xp #dock-bench-row,body.equipment-xp #dock-toolbar{top:46px}
 body.equipment-xp .shop-top{height:100%!important}.equipment-xp .shop-top .poke-img{max-width:42%!important;position:absolute!important;left:38%!important;transform:translateX(-30%)!important}
 body.equipment-xp .shop-name{position:absolute;left:2px;bottom:0;font-size:10px!important;width:55%;height:14px!important;padding:0!important}
 body.equipment-xp .shop-card .shop-info,body.equipment-xp .shop-advice-badge{font-size:9px!important;justify-content:flex-end;align-items:flex-start}
 body.equipment-xp .merge-hint{display:none!important}
 body.equipment-xp #dock-xp-remaining{display:none}
}
@media(orientation:portrait){
 body.equipment-xp #shared-shop-dock{background-size:100% 152px!important;background-position:bottom!important}
 body.equipment-xp #hud-shop-controls{height:152px!important}
 body.equipment-xp #shared-shop-dock>.shop-area{height:152px!important;padding-top:8px!important}
 body.equipment-xp #shop-cards{display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x proximity;scrollbar-width:thin;overscroll-behavior-x:contain}
 body.equipment-xp .shop-card{flex:0 0 calc((100% - 8px)/3)!important;scroll-snap-align:start}
 body.equipment-xp #dock-bench-row{left:0;right:0;top:0;height:100px}
 body.equipment-xp #bench{inset:0!important;width:100%!important;height:100px!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:48px 48px!important;gap:4px!important}
 body.equipment-xp #bench .bench-slot{height:48px!important}
 body.equipment-xp #dock-start{right:0;top:52px;width:calc((100% - 16px)/5);height:48px}
 body.equipment-xp #battle-btn{height:48px!important;font-size:12px!important}
 body.equipment-xp #hud-deploy-count{bottom:51px!important;width:100%!important;height:18px!important;font-size:10px!important;pointer-events:none;transform:translateY(-3px)}
 body.equipment-xp #dock-toolbar{top:-52px;right:auto;left:0;width:160px}
 body.equipment-xp #dock-unitbar:not([hidden]){display:flex;position:absolute;top:-52px;left:52px;right:0;gap:4px;height:44px;background:#123442;z-index:2}
 body.equipment-xp #dock-unitbar button{min-width:44px;min-height:44px;max-width:44px;max-height:44px;padding:5px;background:#193d4c;color:#ecfbff;border:1px solid #638b99;border-radius:5px}
 body.equipment-xp #dock-unitbar button img{max-width:30px;max-height:30px}
 body.equipment-xp #equipment-workspace{display:grid!important;grid-template-columns:44px minmax(0,1fr);grid-template-rows:44px 44px;gap:0;padding:4px!important}
 body.equipment-xp #bc-heading{display:contents!important}
 body.equipment-xp #bc-heading button:first-child{grid-column:1;grid-row:1}
 body.equipment-xp #bc-heading button:nth-child(2){display:none;grid-column:1;grid-row:1}
 body.equipment-xp #equipment-workspace[data-mode=bag] #bc-heading button:nth-child(2){display:block}
 body.equipment-xp #bc-heading [data-dock=grip]{display:none}
 body.equipment-xp #bc-heading button:last-child{position:static;grid-column:1;grid-row:2;background:#173b4c}
 body.equipment-xp #bc-content{grid-column:2;grid-row:1/3;padding-left:4px!important;touch-action:pan-x}
 body.equipment-xp #equipment-workspace[data-mode=bag] #bc-content,body.equipment-xp #equipment-workspace[data-mode=unit] #bc-content{grid-row:1;overflow:auto!important}
 body.equipment-xp #equipment-workspace[data-mode=bag] #bc-actions,body.equipment-xp #equipment-workspace[data-mode=unit] #bc-actions{grid-column:2;grid-row:2;align-self:center}
 body.equipment-xp .dock-grid,body.equipment-xp #item-inventory.dock-grid{display:flex!important;width:max-content!important;flex-wrap:nowrap}
 body.equipment-xp .dock-category{width:90px;flex:0 0 90px;margin-right:4px}
 body.equipment-xp #equipment-workspace[data-mode=codex] #bc-content{display:flex;align-items:flex-start;grid-row:1}
 body.equipment-xp #equipment-workspace[data-mode=codex] #bc-actions{grid-column:2;grid-row:2;z-index:1;align-self:end;height:30px!important}
 body.equipment-xp .dock-unit-slots{display:none}
 body.equipment-xp #equipment-workspace:not([data-mode=bag]):not([data-mode=unit]):not([data-mode=codex]) #bc-content{grid-row:1;overflow:auto!important}
 body.equipment-xp #equipment-workspace:not([data-mode=bag]):not([data-mode=unit]):not([data-mode=codex]) #bc-actions{grid-column:2;grid-row:2;align-self:center}
 body.equipment-xp #dock-xp-remaining{display:none}
 body.equipment-xp #equipment-workspace .dock-slot{touch-action:pan-x}
}

/* The portrait unit bar belongs above the drawer, clear of its own close button. */
@media(orientation:portrait){body.equipment-xp #dock-unitbar:not([hidden]){top:-152px;left:56px;right:48px;z-index:165}body.equipment-xp #dock-unitbar button{flex:0 0 44px}body.equipment-xp #equipment-workspace[data-mode=unit] #bc-heading button:last-child{top:-48px} }

body.equipment-xp #hud-shop-controls #reroll-btn{display:grid!important;grid-template-columns:18px 1fr auto!important;grid-template-rows:1fr!important;gap:3px!important;align-items:center!important}body.equipment-xp #reroll-btn img{width:18px!important;height:18px!important}body.equipment-xp #reroll-btn span,body.equipment-xp #reroll-btn b{margin:0!important;position:static!important;font-size:11px!important;white-space:nowrap}body.equipment-xp #hud-level-title{display:flex!important;align-items:center;justify-content:space-between;gap:3px}body.equipment-xp #hud-level-title #xp-label{display:inline!important;font-size:10px!important;white-space:nowrap}body.equipment-xp #hud-level-title #level-label{font-size:17px!important}
@media(max-width:1100px) and (orientation:landscape){body.equipment-xp #shared-shop-dock .shop-name{min-height:14px!important;height:14px!important;line-height:14px!important;left:3px!important;bottom:0!important;color:#fff!important;width:calc(100% - 30px)!important;font-size:11px!important}body.equipment-xp .shop-cost{right:3px!important;bottom:1px!important;top:auto!important;font-size:13px!important;color:#ffe284!important;z-index:2}body.equipment-xp .shop-stars{left:2px!important;top:2px!important;bottom:auto!important}body.equipment-xp .shop-top>.poke-img{max-height:32px!important;bottom:13px!important;top:auto!important}body.equipment-xp .shop-info{font-size:13px!important;align-items:flex-start!important;padding-top:3px!important;justify-content:flex-end!important;padding-right:4px!important}}

body.equipment-xp .dock-empty{grid-column:1/-1;font-size:12px;padding:4px;line-height:1.5}
/* The vacant tenth portrait cell holds Start, not a bench hit target. */
@media(orientation:portrait){body.equipment-xp #bench{pointer-events:none}body.equipment-xp #bench .bench-slot{pointer-events:auto}}
