/* Original 345x400 Item art, sampled directly with CSS; no redrawn textures.
   Icon: x8 y43 w30 h25; name: x40 y49 w223 h16; quantity: x268 y49 w51 h16. */
#inventory #items{top:43px;left:8px;right:8px;width:auto;height:300px;padding:0;margin:0;overflow-x:hidden;overflow-y:auto;background:#10104a;box-sizing:border-box;touch-action:pan-y;overscroll-behavior:contain}
#inventory #items .tw-item-row{box-sizing:border-box;display:grid;grid-template-columns:30px minmax(0,1fr) 46px;align-items:center;gap:5px;width:100%;height:30px;min-height:30px;margin:0;padding:0;border:0;border-radius:0;background:transparent;line-height:16px;letter-spacing:0;transform:none}
#inventory #items .tw-item-row:hover,#inventory #items .tw-item-row:focus-visible{background:#bba5ff26;box-shadow:inset 0 0 0 1px #c5b2f0}
#inventory #items .tw-slot-icon,#inventory #items .tw-slot-name,#inventory #items .tw-slot-quantity{box-sizing:border-box;position:relative;display:block;width:100%;min-width:0;height:25px;margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:25px;font:11px/25px 'Microsoft JhengHei',sans-serif;isolation:isolate}
#inventory #items .tw-slot-icon{display:grid;place-items:center}
#inventory #items .tw-slot-icon::before,#inventory #items .tw-slot-name::before,#inventory #items .tw-slot-quantity::before{content:'';position:absolute;z-index:-1;left:0;right:0;top:50%;height:16px;transform:translateY(-50%);background-image:url('assets/ui/1681-0000.png');background-repeat:no-repeat;pointer-events:none;image-rendering:pixelated}
#inventory #items .tw-slot-icon::before{height:25px;background-size:345px 400px;background-position:-8px -43px}
#inventory #items .tw-slot-name::before{background-size:154.70852% 400px;background-position:32.786885% -49px}
#inventory #items .tw-slot-quantity::before{background-size:676.47059% 400px;background-position:91.156463% -49px}
#inventory #items .tw-slot-name{text-indent:4px}
#inventory #items .tw-slot-quantity{text-align:center}
#inventory #items .tw-slot-icon img{display:block;width:24px;height:24px;max-width:24px;max-height:24px;margin:0;object-fit:contain;image-rendering:pixelated}
#inventory #items .tw-empty-slot{pointer-events:none;box-shadow:none}
@media(max-width:610px){
 #inventory #items{left:5px;right:5px;height:306px}
 #inventory #items .tw-item-row{grid-template-columns:30px minmax(0,1fr) 32px;gap:3px;height:34px;min-height:34px}
 #inventory #items .tw-slot-name{font-size:10px}
 #inventory #items .tw-slot-quantity{font-size:10px}
}

/* The two original windows stand alone; details only open for a selected item. */
#inventory.native-inventory-only{width:548px;max-width:calc(100vw - 16px);height:400px;max-height:none;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;overflow:visible}
#inventory.native-inventory-only .tw-windows{gap:6px;margin:0;padding:0}
#inventory.native-inventory-only .tw-dismiss{position:absolute;z-index:2;top:4px;right:6px;width:18px;height:16px;min-height:0;margin:0;padding:0;border:0;border-radius:2px;background:#a99ada7a;color:#30264e;font:bold 17px/15px sans-serif;box-shadow:none}
#inventory.native-inventory-only .tw-dismiss:hover{background:#e1d7ff}
#inventory.native-inventory-only>.tw-stats,#inventory.native-inventory-only>#quality-legend,#inventory.native-inventory-only>.wing-rule,#inventory.native-inventory-only>.tw-note{display:none}
#inventory.native-inventory-only #inventory-context{position:fixed;right:auto;bottom:auto;height:auto;z-index:4;display:flex;align-items:center;align-content:flex-start;gap:7px;box-sizing:border-box;width:310px;max-width:calc(100vw - 14px);margin:0;padding:10px;border:2px double #b3a0db;border-radius:4px;background:#282044f5;box-shadow:0 4px 16px #0007;overflow:auto;overscroll-behavior:contain;color:#f6eeff;font:11px/1.7 'Microsoft JhengHei',sans-serif}
#inventory.native-inventory-only #inventory-context[hidden],#inventory.native-inventory-only #inventory-context [hidden]{display:none!important}
#inventory.native-inventory-only #inventory-context>label,#inventory.native-inventory-only #open-equipment-guide,#inventory.native-inventory-only #bag-attributes,#inventory.native-inventory-only #save-now{display:none}
#inventory.native-inventory-only #item-description{width:100%;margin:0;padding:0 16px 3px 0;box-sizing:border-box;overflow-wrap:anywhere;line-height:1.7}
#inventory.native-inventory-only #inventory-context>button{min-height:26px;padding:3px 9px;font-size:11px;letter-spacing:0}
#inventory.native-inventory-only #inventory-context>.inventory-context-close{position:absolute;top:3px;right:3px;width:21px;height:21px;min-height:21px;padding:0;border:0;background:transparent;font-size:18px;line-height:21px}
#inventory.native-inventory-only #inventory-quickbar{flex:0 0 100%;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:6px;border:1px solid #8873b0;background:#34294d}
#inventory.native-inventory-only #inventory-quickbar .quickbar-title{font-size:10px;margin:0 0 4px;white-space:normal}
#inventory.native-inventory-only #inventory-quickbar .quick-slots{gap:4px}
#inventory.native-inventory-only #inventory-quickbar .quick-slot{grid-template-columns:1fr;grid-template-rows:26px 13px 13px;gap:0;padding:3px 1px;min-height:56px;justify-items:center;text-align:center}
#inventory.native-inventory-only #inventory-quickbar .quick-slot img{grid-row:1;width:24px;height:24px}
#inventory.native-inventory-only #inventory-quickbar .quick-slot span,#inventory.native-inventory-only #inventory-quickbar .quick-slot small{font-size:9px;max-width:100%}
#inventory.native-inventory-only #inventory-quickbar select{box-sizing:border-box;width:100%;min-width:0;padding:3px 0;font-size:10px}
@media(max-width:610px){
 #inventory.native-inventory-only{width:calc(100vw - 16px);padding:0}
 #inventory.native-inventory-only .tw-windows{width:100%;grid-template-columns:minmax(0,.37fr) minmax(0,.63fr);gap:6px}
}

/* Keep currency after the original SEED icon, including narrow two-window layouts. */
#inventory.native-inventory-only #tw-seed{left:67%;right:5%;top:377px;text-align:right;font:10px/16px Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Replace the bitmap's abbreviated currency mark with the complete label. */
#inventory.native-inventory-only #tw-weight{display:none}
#inventory.native-inventory-only #tw-seed{left:27%;right:4%;display:flex;align-items:center;justify-content:space-between;gap:5px;padding:0 7px;box-sizing:border-box;background:#272061;border-radius:8px;font:10px/16px Arial;overflow:visible;white-space:nowrap}
#inventory.native-inventory-only #tw-seed::before{content:'SEED';flex:none;color:#fff;font-weight:bold}
