
/* Native u146.ui storage is a360×360 authored sheet with a five-row grid. */
#npcWarehouse{position:fixed;inset:50% auto auto 50%;margin:0;width:540px;max-width:none;height:540px;max-height:none;box-sizing:border-box;padding:0;border:2px solid #83a8a2;border-radius:0;background:#083031;color:#fff;overflow:visible;font:28px/30px NpcShopLD,Arial,sans-serif;letter-spacing:0;text-shadow:1px 1px #102829;transform:translate(-50%,-50%) scale(var(--warehouse-scale,1));transform-origin:center;box-shadow:none}

#npcWarehouse[open]{display:flex;flex-direction:column}

#npcWarehouse::backdrop{background:transparent}

#npcWarehouse *,#npcWarehouse *::before,#npcWarehouse *::after{box-sizing:border-box}

#npcWarehouse button{font:inherit;letter-spacing:0}

#npcWarehouse button:focus{outline:none}

#npcWarehouse header{position:relative;flex:none;height:33px;min-height:33px;margin:0;padding:0;background:#639a94;border-bottom:2px solid #93b5ac;display:flex;justify-content:center;align-items:center;overflow:hidden}

#npcWarehouse header::before,#npcWarehouse header::after{content:"";position:absolute;top:0;bottom:0;width:120px;background:url('./native/apk-title-cloud.png') left center/cover no-repeat;pointer-events:none}

#npcWarehouse header::before{left:0}

#npcWarehouse header::after{right:0;transform:scaleX(-1)}

#npcWarehouse h2{position:relative;z-index:1;margin:0;padding:0;font:28px/31px NpcShopLD,Arial,sans-serif;text-align:center;color:#e4eee0;text-shadow:1px 2px #4a7972;white-space:nowrap}

#npcWarehouse[data-stage=quantity] .npc-shop-tabs button:disabled,#npcWarehouse[data-stage=sale] .npc-shop-tabs button:disabled,#npcWarehouse[data-stage=pending] .npc-shop-tabs button:disabled{opacity:1}

#npcWarehouse[data-tab=redeem] .npc-shop-price{text-align:left}

/* Buy stock uses the same native quality frames as inventory/sell/redeem. */
#npcWarehouse .npc-shop-row>.equipment-icon,#npcWarehouse .npc-shop-inspection h3>.equipment-icon{width:33px;height:33px;overflow:visible;line-height:0}

#npcWarehouse .npc-shop-row>.equipment-icon::after,#npcWarehouse .npc-shop-inspection h3>.equipment-icon::after{left:0;top:0}

#npcWarehouse .equipment-icon>.native-item-icon{border:0;border-radius:0;image-rendering:pixelated}

#npcWarehouse .npc-shop-row>.equipment-icon>.native-item-icon,#npcWarehouse .npc-shop-inspection h3>.equipment-icon>.native-item-icon{display:block;flex:none;width:33px;height:33px;background-color:#0c292c}

#npcWarehouse footer{position:absolute;top:241px;left:663px;width:74px;display:flex;flex-direction:column;gap:46px;margin:0;padding:0;border:0;transform:none;background:transparent}

#npcWarehouse footer .native-button{position:static;flex:none;width:74px;height:74px;min-height:0;margin:0;padding:0;border:0;border-radius:50%;background-color:transparent;background-position:center;background-size:100% 100%;background-repeat:no-repeat;box-shadow:none}

#npcWarehouse .native-button[data-art=confirm]{background-image:url('./native/confirm.png')}

#npcWarehouse .native-button[data-art=back]{background-image:url('./native/back.png')}

#npcWarehouse .native-button:disabled{opacity:.5;cursor:default}

#npcWarehouse[data-stage=pending] .npc-shop-quantity{pointer-events:none}

#npcWarehouse [hidden]{display:none!important}

#npcWarehouse .npc-shop-price{text-align:left}
#npcWarehouse[data-tab=withdraw] .npc-shop-tabs button[aria-selected=true]{color:#ff0000}
#npcWarehouse .npc-shop-money>button{display:flex;align-items:center;gap:3px;min-width:0;height:100%;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;text-shadow:none;white-space:nowrap;overflow:hidden}
#npcWarehouse .warehouse-money-editor{position:absolute;z-index:4;left:28px;top:99px;width:480px;height:306px;box-sizing:border-box;margin:0;padding:0;border:2px solid #9cb5ab;background:#083031;color:#fff;font:28px/30px NpcShopLD,Arial,sans-serif}
#npcWarehouse .warehouse-money-title{position:absolute;left:52px;right:42px;top:8px;margin:0;min-height:60px;line-height:30px;word-break:break-all;overflow-wrap:anywhere}
#npcWarehouse .warehouse-money-editor label{position:absolute;left:52px;top:88px;right:42px;font:28px/34px NpcShopLD,Arial,sans-serif}
#npcWarehouse .warehouse-money-editor input{display:block;position:absolute;left:0;top:55px;width:380px;height:64px;margin:0;padding:0 2px;border:1px solid #789187;border-radius:0;background:#fff;color:#000;font:28px/62px NpcShopLD,Arial,sans-serif;text-shadow:none;outline:none}
#npcWarehouse .warehouse-money-actions{position:absolute;left:52px;right:42px;top:213px;display:flex;justify-content:space-between}
#npcWarehouse .warehouse-money-actions button{display:flex;justify-content:center;align-items:center;width:90px;height:60px;margin:0;padding:0;border:4px ridge #5d7375;border-radius:0;background:#293c42;color:#fff;font:28px/48px NpcShopLD,Arial,sans-serif;white-space:nowrap;overflow:hidden;text-shadow:1px 2px #142a2b;box-shadow:none}
#npcWarehouse .npc-shop-message{color:#000;text-shadow:none}
#npcWarehouse[data-stage=inspection] .npc-shop-content{padding:8px 5px}

body:has(#npcWarehouse[open]) #controls,body:has(#npcWarehouse[open]) #menu,body:has(#npcWarehouse[open]) #shortcutMode{visibility:hidden}
#npcWarehouse .warehouse-scroll-down{position:absolute;left:calc(50% - 14.5px);bottom:0;width:29px;height:17px;background:url(./native/ld-scroll-down.png) center/contain no-repeat;image-rendering:pixelated;pointer-events:none;z-index:2}

#npcDialog[data-warehouse-dialog]{position:fixed;inset:calc(50% - 19px * var(--warehouse-dialog-scale,1)) auto auto 50%;margin:0;width:450px;max-width:none;max-height:none;padding:8px;border:2px ridge #9cb5ab;background:#083031;transform:translate(-50%,-50%) scale(var(--warehouse-dialog-scale,1));transform-origin:center;font-family:LDDialog,Arial,sans-serif}
#npcDialog[data-warehouse-dialog]::backdrop{background:transparent}
#npcDialog[data-warehouse-dialog] #dialogText{padding:0 2px;max-height:none;overflow:visible;font:28px/30px LDDialog,Arial,sans-serif}
#npcDialog[data-warehouse-dialog] #dialogText p{margin:0;white-space:pre-line;text-indent:28px;word-break:break-all;overflow-wrap:anywhere}
#npcDialog[data-warehouse-dialog] #dialogChoices{flex:none;max-height:none;gap:0;margin:10px 0 2px;padding:0;overflow:visible}
#npcDialog[data-warehouse-dialog] #dialogChoices button{height:60px;min-height:60px;font:28px/30px LDDialog,Arial,sans-serif;padding:8px 2px}
#npcDialog[data-warehouse-dialog] #dialogChoices button.selected{background:#fff79c}
#npcDialog[data-warehouse-dialog] .game-dialog-actions{gap:0;margin:0;padding:0;border:0}
#npcDialog[data-warehouse-dialog] .game-dialog-actions button{height:60px;min-height:60px;font:28px/32px LDDialog,Arial,sans-serif;padding:3px;border:3px ridge #7b9592;background:#293c42;overflow:hidden}
#npcDialog[data-warehouse-dialog] #confirmNpc,#npcDialog[data-warehouse-dialog] #closeNpc{width:90px}
#npcDialog[data-warehouse-dialog] #npcUp,#npcDialog[data-warehouse-dialog] #npcDown{width:74px}
#npcDialog[data-warehouse-dialog] #npcUp{margin-left:40px}
#npcDialog[data-warehouse-dialog] #npcDown{margin-left:10px}
#npcDialog[data-warehouse-dialog] #closeNpc{margin-left:auto}

#npcWarehouse .warehouse-recovery:not([hidden]){position:absolute;left:20px;right:20px;bottom:55px;z-index:12;padding:10px;background:#29251f;border:1px solid #bca879;color:#fff3ce;box-shadow:0 2px 8px #0008}#npcWarehouse .warehouse-recovery p{margin:0 0 8px}#npcWarehouse .warehouse-recovery button{margin-right:8px;padding:6px 10px;min-height:34px;background:#544734;color:#fff3ce;border:1px solid #d2bc85}
/* Source u146 list geometry; inspections and inputs retain their own stages. */
#npcWarehouse{background:#093135}
#npcWarehouse header{height:36px;min-height:36px;background:#669b91}
#npcWarehouse h2{color:#fff}
#npcWarehouse .npc-shop-scroll{flex:0 1 366px;max-height:366px;margin-top:3px;background:#093135}
#npcWarehouse .npc-shop-money{position:sticky;top:0;z-index:1;height:60px;min-height:60px;margin-bottom:6px;background:#1a4a4c;border-bottom-color:#20534b}
#npcWarehouse .npc-shop-row{background:#1a4a4c;border-bottom-color:#20534b}
#npcWarehouse .npc-shop-row:nth-child(even){background:#1d565e}
#npcWarehouse .npc-shop-menu button{background:#3c4147;border-color:#8fa29e;box-shadow:inset 0 0 0 1px #2f5153}
#npcWarehouse .npc-shop-menu button:first-child{background:#3c4147;color:#fff}
#npcWarehouse .npc-shop-menu button.selected{background:#acb5b7;color:#f00}
#npcWarehouse[data-stage=inspection] .npc-shop-scroll{flex:1;max-height:none;margin-top:0}
#npcWarehouse .npc-shop-inspection .apk-item-detail{margin:0;padding:8px;border:0;white-space:normal;background:#093135}
#npcWarehouse .npc-shop-inspection .apk-item-detail h3{display:flex;align-items:center;gap:10px;min-width:0;margin:0 0 12px;font:28px/33px NpcShopLD,Arial,sans-serif}
#npcWarehouse .npc-shop-inspection .apk-item-detail h3>.equipment-inspection-name{display:block;flex:1;min-width:0;overflow:hidden;white-space:nowrap}
#npcWarehouse .npc-shop-inspection :is(.equipment-observed-inspection,.apk-native-inspection-line,p){white-space:pre-wrap;word-break:normal;line-break:auto;overflow-wrap:break-word}
#npcWarehouse .warehouse-money-title{word-break:normal;line-break:auto;overflow-wrap:break-word}
#npcWarehouse .npc-shop-message{word-break:normal;line-break:auto;overflow-wrap:break-word}

/* Focused StringList names use the existing shared loop; unselected rows reset their offset. */
#npcWarehouse .npc-shop-name.overflowing>span{animation:none}

#npcWarehouse .npc-shop-menu button{border:1px solid #2f5153;box-shadow:inset 0 0 0 1px #8fa29e,inset 0 0 0 2px #37494b,inset 0 0 0 3px #8b8b8b}
#npcWarehouse .npc-shop-name .equipment-name.item-quality-gray{color:#676767}

/* Owned quantities follow the bag: a separate line below the33px icon.
   Capacity remains an occupied-cell count; equipment durability is not a stack. */
#npcWarehouse .npc-shop-item.warehouse-item-art{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;width:42px;height:54px;overflow:visible!important}
#npcWarehouse .warehouse-item-art>.inventory-icon{flex:none;width:33px;height:33px}
#npcWarehouse .warehouse-item-art>.warehouse-item-quantity{position:static;display:block;flex:none;width:42px;height:16px;margin:0;padding:0 3px 0 0;background:transparent;color:#eee;font:13px/16px InventoryLD,NpcShopLD,Arial,sans-serif;text-align:right;text-shadow:none;white-space:nowrap;overflow:visible}
#npcWarehouse .warehouse-equipment-art{min-height:33px}

#npcWarehouse .warehouse-inspection-quantity{margin:10px 8px;color:#fcffb4;font:inherit;white-space:normal}
#npcWarehouse .warehouse-inspection-quantity>span{color:#fff}
