/* Inventory reference coordinate space: 941 x 1672. */
#app:has(#screen-inv.active){background:#9dddeb url('assets/home/habitat.png') center/var(--inventory-width) var(--inventory-height) no-repeat}
#app:has(#screen-inv.active) #topbar,#app:has(#screen-inv.active) #bottomnav{display:none}
#app:has(#screen-inv.active) .pet-region{position:absolute;inset:0}
#app:has(#screen-inv.active) #screens{position:absolute;left:var(--inventory-left);top:var(--inventory-top);width:941px;height:1672px;transform:scale(var(--inventory-scale));transform-origin:top left;padding:0;overflow:visible}
#screen-inv{position:relative;width:941px;height:1672px;color:#123c59;font-family:Arial,'Sarabun',sans-serif}
#screen-inv.active{animation:none}
.inventory-header{position:absolute;inset:0 0 auto;height:181px}
#inv-back{position:absolute;left:25px;top:39px;width:116px;height:116px;margin:0;padding:0;border:3px solid #d7ffff;border-radius:58px;background:linear-gradient(135deg,#1b708cae,#125374e9);box-shadow:inset 0 0 0 5px #ffffff20,0 0 14px #bbffff;color:white;font:72px/100px Arial,sans-serif;z-index:2}
.inventory-header h1{position:absolute;left:149px;top:60px;width:344px;height:76px;margin:0;padding:14px 37px;border:2px solid #98eff1;border-radius:42px;background:linear-gradient(110deg,#17655edb,#166585c9);box-shadow:inset 0 0 0 4px #8ce8dc28;color:white;font:700 38px/45px Arial,sans-serif;letter-spacing:1px;text-align:center}
.inventory-counters{position:absolute;left:532px;top:48px;width:248px;height:111px}
.inventory-counters>div{position:relative;height:52px;margin-bottom:5px;padding:8px 17px 6px 87px;border-radius:30px;background:linear-gradient(#174f78e8,#174969c7);border:1px solid #94cbe77a;color:white;text-align:center;font:600 31px/36px Arial,sans-serif}
.inventory-counters img{position:absolute;left:13px;top:-8px;width:58px;height:58px;object-fit:contain}
.inventory-counters .inv-capacity img{left:23px;top:-5px;width:48px;height:48px}
.inventory-menu{position:absolute;left:810px;top:38px;width:106px;height:106px;padding:25px;border:3px solid #a4edff;border-radius:30px;background:linear-gradient(135deg,#287b96c7,#20557fe0);box-shadow:inset 0 0 0 5px #ffffff15,0 0 12px #b6eeff9c;display:flex;flex-direction:column;justify-content:center;gap:10px;cursor:pointer}
.inventory-menu i{display:block;height:9px;border-radius:9px;background:white}
.inventory-board{position:absolute;left:24px;top:215px;width:893px;height:813px;padding:42px 118px 22px 30px;border:3px solid #e5ffff;border-radius:42px;background:linear-gradient(145deg,#c8f7f0aa,#9ed9ec9e);box-shadow:inset 0 0 0 6px #fff2,0 0 18px #c0fdff99;backdrop-filter:blur(8px)}
#inv-grid{display:grid;grid-template-columns:repeat(5,1fr);grid-auto-rows:calc((100% - 48px) / 5);gap:12px;width:100%;height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none} /* scrolls up/down like iOS/Android, 5 rows in view, no scrollbar */
#inv-grid::-webkit-scrollbar{display:none}
.inventory-slot{position:relative;min-width:0;border:3px solid #eaffff;border-radius:22px;background:linear-gradient(145deg,#b6dbe4d9,#8bc2cdbb);box-shadow:inset 0 0 8px #ffffff50,0 3px 6px #0b496433;overflow:hidden;padding:5px;cursor:pointer}
.inventory-slot.filled{background:linear-gradient(145deg,#c6eef4e8,#8fc6d4db)}
/* User report 2026-09-12: web's inventory grid never tinted slots by rarity, unlike iOS
   (reference screenshot: gray/blue/purple/gold backgrounds per Common/Rare/Epic/Legendary).
   Reuses the same 4 colors already established for rarity elsewhere in this app (game.css's
   .rarity-* border colors, codex.html's rarity badges) instead of inventing a new palette. */
.inventory-slot.filled.rarity-common{background:linear-gradient(145deg,#e3e6e8e8,#b7bfc4db)}
.inventory-slot.filled.rarity-rare{background:linear-gradient(145deg,#a9d8fbe8,#5ba3e0db)}
.inventory-slot.filled.rarity-epic{background:linear-gradient(145deg,#d9b3f3e8,#a862d6db)}
.inventory-slot.filled.rarity-legendary{background:linear-gradient(145deg,#ffe2a0e8,#ffb300db)}
.inventory-slot.selected{border-color:#25fff0;box-shadow:inset 0 0 0 5px #21e3e07a,0 0 17px #1afff0}
.inventory-equip-slot.selected{border-color:#25fff0;box-shadow:inset 0 0 0 5px #21e3e07a,0 0 17px #1afff0}
.inventory-slot img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 5px 3px #164f5c44)}
.inventory-slot b{position:absolute;right:7px;bottom:5px;padding:0 4px;border-radius:8px;background:#174a6ca8;color:white;font:700 27px Arial,sans-serif;text-shadow:0 2px 2px #123}
.inventory-slot .slot-mark{display:block;width:64px;height:64px;margin:auto;opacity:.75;filter:none}
.inventory-categories{position:absolute;right:7px;top:42px;width:95px;display:flex;flex-direction:column;gap:10px} /* top lines up with the first grid row */
.inventory-categories button{width:95px;height:113px;border:2px solid #a8ecff;border-radius:25px;background:linear-gradient(#257994e8,#1b5e7fe8);box-shadow:inset 0 0 0 4px #fff1;color:#eaffff;font:48px Arial,sans-serif;cursor:pointer}
.inventory-categories button.active{background:linear-gradient(#20c8ba,#0a9fa1);border-color:#eaffff;box-shadow:inset 0 0 0 5px #fff4,0 0 13px #36ffee}
.inventory-categories button img{display:block;width:54px;height:54px;margin:auto;object-fit:contain}
.inventory-counters .inv-capacity{cursor:pointer}
.inv-capacity .inv-plus{position:absolute;right:-10px;top:-10px;width:34px;height:34px;border-radius:50%;background:linear-gradient(#ffd75a,#f0a51c);border:2px solid #fff;color:#6b3a00;font:900 30px/28px Arial,sans-serif;box-shadow:0 2px 4px #0006}
.inv-capacity.bag-maxed .inv-plus{display:none}
.inv-capacity.over-capacity{color:#fff1f1;background:#a92139!important;box-shadow:0 0 0 2px #ffb3c1 inset}
.inventory-equipment{position:absolute;left:48px;top:1043px;width:846px;height:292px;padding:21px 28px;border:3px solid #eaffff;border-radius:39px;background:linear-gradient(145deg,#d9fdf8df,#b4e9efcb);box-shadow:inset 0 0 0 5px #fff4,0 5px 12px #0b496433;backdrop-filter:blur(8px)}
.inventory-equipment h2{height:49px;margin:0 0 15px;font:700 31px/49px Arial,sans-serif}
#equip-slots{height:184px;display:grid;grid-template-columns:repeat(4,1fr);gap:17px}
.inventory-equip-slot{position:relative;min-width:0;border:4px solid #b9eeff;border-radius:25px;background:linear-gradient(145deg,#bde8f2,#7fb7d2);box-shadow:inset 0 0 0 5px #ffffff4d,0 0 10px #48caff;padding:8px;overflow:hidden;color:#173f5b}
.inventory-equip-slot.weapon{border-color:#b4ff8e;background:linear-gradient(145deg,#c8ffc5,#63d39a)}
.inventory-equip-slot.armor{border-color:#82d8ff;background:linear-gradient(145deg,#b9e9ff,#599ee9)}
.inventory-equip-slot.accessory{border-color:#ffcf68;background:linear-gradient(145deg,#fff0a6,#f2ad3e)}
.inventory-equip-slot.accessory2{border-color:#df99ff;background:linear-gradient(145deg,#e8c5ff,#9b62e4)}
.inventory-equip-slot img{width:100%;height:125px;object-fit:contain;filter:drop-shadow(0 5px 4px #18324b55)}
.inventory-equip-slot b{position:absolute;right:8px;bottom:8px;max-width:90%;padding:2px 7px;border-radius:14px;background:#183e60b8;color:white;font:700 19px Arial,sans-serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inventory-equip-slot .empty-equip-icon{display:block;width:82px;height:82px;margin:15px auto 4px;filter:none}.inventory-equip-slot small{display:block;font-size:15px;font-weight:700;letter-spacing:.5px}
.inventory-detail{position:absolute;left:27px;top:1370px;width:887px;height:250px;padding:28px 34px;display:flex;align-items:center;gap:32px;border:3px solid #eaffff;border-radius:43px;background:linear-gradient(120deg,#dbfff6e8,#b8eef1d8);box-shadow:inset 0 0 0 6px #fff4,0 0 18px #c0fdff99;backdrop-filter:blur(8px)}
.inventory-detail>img{width:170px;height:170px;padding:8px;border:4px solid #d8ffff;border-radius:34px;background:linear-gradient(145deg,#ccffd2,#73dba5);object-fit:contain;filter:drop-shadow(0 5px 4px #165c6355)}
/* User report 2026-09-12: this icon frame was a hardcoded green regardless of item (e.g.
   Storm Crystal, an Epic accessory, showed the same green as everything else) - tint it by
   rarity like the grid slots (same 4 colors, added just above for .inventory-slot). */
.inventory-detail>img.rarity-common{background:linear-gradient(145deg,#e3e6e8,#b7bfc4)}
.inventory-detail>img.rarity-rare{background:linear-gradient(145deg,#a9d8fb,#5ba3e0)}
.inventory-detail>img.rarity-epic{background:linear-gradient(145deg,#d9b3f3,#a862d6)}
.inventory-detail>img.rarity-legendary{background:linear-gradient(145deg,#ffe2a0,#ffb300)}
.inventory-detail-copy{flex:1;min-width:0}.inventory-detail-copy h3{margin:0 0 8px;font-size:35px}.inventory-detail-copy p{margin:0 0 12px;color:#426883;font-size:27px}.inventory-detail-copy b{padding:2px 18px;border-radius:22px;background:#4b7998;color:white;font-size:31px}
.inventory-detail>button,.inventory-detail-actions>button{width:253px;height:105px;border:5px solid #fff1a8;border-radius:56px;background:linear-gradient(#ffd45a,#ffae21);box-shadow:inset 0 0 0 5px #fff4,0 4px 9px #c37515;color:#623703;font:700 38px Arial,sans-serif;cursor:pointer}
.inventory-detail-actions{width:253px;display:flex;flex-direction:column;gap:10px}.inventory-detail-actions>button{height:79px;font-size:29px}.inventory-detail-actions>.inventory-sell{border-color:#ffd5d5;background:linear-gradient(#ff8b75,#e94343);box-shadow:inset 0 0 0 4px #fff4,0 4px 9px #9f3030;color:white}.inventory-detail-actions>.inventory-sell:disabled{filter:grayscale(.7);opacity:.48;cursor:not-allowed}
.inventory-empty-detail{width:100%;text-align:center;font-size:28px;color:#52788d}
.inventory-menu:focus-visible,#inv-back:focus-visible,.inventory-slot:focus-visible,.inventory-categories button:focus-visible,.inventory-equip-slot:focus-visible,.inventory-detail button:focus-visible{outline:5px solid #ffcc42;outline-offset:4px}

/* Shared full-screen navigation geometry (941px reference coordinates). */
#inv-back{left:27px;top:40px;width:114px;height:114px;border-radius:50%}
#inv-back>img{display:block;width:52%;height:52%;margin:auto;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 2px rgba(0,39,69,.42))}
.inventory-header h1{left:155px;top:53px;height:86px;padding-block:14px}
.inventory-menu{left:800px;top:40px;width:114px;height:114px;padding:27px;border-radius:32px}
@media(prefers-reduced-motion:reduce){#screen-inv *{animation:none!important;transition:none!important}}
/* MYTHIC (Final Weapon, 11-13): prismatic — the 5 element colours */
.inventory-slot.filled.rarity-mythic{background:linear-gradient(135deg,#8fd3ffe8,#9ff2c6e0,#ffd86be0,#ff9a8ae0,#c9a3ffe8)}
.inventory-detail>img.rarity-mythic{background:linear-gradient(135deg,#8fd3ff,#9ff2c6,#ffd86b,#ff9a8a,#c9a3ff)}
