/* Compact currency boxes; explicit IDs override legacy balance sizes. */
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-head .tk-shop-header-balances.tk-currency-art-v752{position:absolute!important;left:auto!important;bottom:auto!important;transform:none!important;margin:0!important;padding:0!important;width:180px!important;max-width:180px!important;height:60px!important;min-height:0!important;right:44px!important;top:30px!important;gap:4px!important;flex:none!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-head .tk-shop-header-balances .shop-currency-row{position:relative!important;display:flex!important;align-items:center!important;flex:0 0 28px!important;width:180px!important;min-width:180px!important;max-width:180px!important;height:28px!important;min-height:28px!important;max-height:28px!important;box-sizing:border-box!important;padding:3px 28px 3px 7px!important;gap:4px!important;margin:0!important;overflow:hidden!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-head .tk-shop-header-balances .tk-currency-name-pair{display:flex!important;align-items:center!important;gap:3px!important;min-width:62px!important;width:62px!important;max-width:62px!important;flex:0 0 62px!important;margin:0!important;padding:0!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-head .tk-shop-header-balances .tk-currency-name-pair img{width:18px!important;height:18px!important;max-width:18px!important;flex:0 0 18px!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-head .tk-shop-header-balances .tk-currency-name-pair span,
html body.rustic-desktop #currencyShop.three-kingdom-shop #shopCoinBalance,
html body.rustic-desktop #currencyShop.three-kingdom-shop #shopVoucherBalance{font-family:'DFKai-SB','標楷體','BiauKai',serif!important;font-size:12px!important;line-height:16px!important;letter-spacing:0!important;-webkit-text-stroke:0!important;text-shadow:none!important;margin:0!important;min-width:0!important;white-space:nowrap!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-head .tk-shop-header-balances .tk-recharge-plus{position:absolute!important;right:6px!important;left:auto!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-width:18px!important;padding:0!important;margin:0!important;flex:none!important}
/* Bag rows scroll vertically; quantity controls follow the description closely. */

html body.rustic-desktop #currencyShop.three-kingdom-shop [data-shop-panel="bag"]{min-height:0!important;overflow:hidden!important;align-items:stretch!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop [data-shop-panel="bag"] .tk-shop-bag-rows{display:block!important;width:100%!important;max-width:none!important;align-self:stretch!important;overflow-x:hidden!important;box-sizing:border-box!important;padding-right:5px!important;margin-bottom:20px!important;flex:1 1 0!important;min-height:0!important;overflow:auto!important;gap:0!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop [data-shop-panel="bag"] .tk-shop-bag-item{display:grid!important;grid-template-columns:46px minmax(0,1fr) 110px 58px!important;align-items:center!important;min-height:68px!important;padding:6px 5px!important;column-gap:10px!important;width:min(100%,430px)!important;max-width:430px!important;margin-left:max(0px,calc(50% - 300.5px))!important;box-sizing:border-box!important}
html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog) .tk-shop-bag-pager{display:none!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop [data-shop-panel="bag"] .tk-shop-bag-name{font-size:16px!important;line-height:1.4!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop [data-shop-panel="bag"] .tk-shop-bag-description{font-size:13px!important;line-height:1.4!important;overflow-wrap:anywhere!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop [data-shop-panel="bag"] .tk-shop-bag-item>.tk-shop-catalog-image{width:44px!important;height:44px!important;max-height:44px!important;object-fit:contain!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop [data-shop-panel="bag"] .tk-shop-bag-item>button{width:58px!important;min-width:58px!important;height:28px!important;padding:2px 4px!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .shop-currency-row>strong{flex:1 1 0!important;text-align:right!important;max-width:75px!important}
/* Confirmation and success are overlays, never flex children in the shop layout. */
html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog)>.tk-shop-confirm-overlay{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important;padding:20px!important;background:#17120dc0!important;z-index:1000!important;margin:0!important;flex:none!important}
html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog) .tk-shop-confirm-panel{position:relative!important;inset:auto!important;transform:none!important;flex:0 1 340px!important;width:340px!important;min-width:0!important;max-width:calc(100% - 24px)!important;height:auto!important;min-height:150px!important;max-height:75vh!important;overflow:auto!important;padding:26px!important;box-sizing:border-box!important;z-index:1001!important;background:transparent url('/assets/rustic-v1045/shop-dialog.webp') center/100% 100% no-repeat!important}
html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog) .tk-shop-confirm-panel h3{font-size:18px!important;margin:0 0 10px!important}
html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog) .tk-shop-confirm-panel p{font-size:14px!important;line-height:1.5!important;margin:0 0 14px!important}
html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog) .tk-shop-confirm-actions{display:flex!important;justify-content:center!important;gap:12px!important}
html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog) .tk-shop-confirm-panel button{min-width:70px!important;height:30px!important;min-height:30px!important;padding:3px 10px!important;font-size:14px!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-category-area{overflow-y:auto!important;overflow-x:hidden!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-grid{flex:0 0 auto!important;height:auto!important;min-height:0!important;grid-template-rows:repeat(2,225px)!important;grid-auto-rows:225px!important;overflow:visible!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-product{height:225px!important;min-height:225px!important;max-height:225px!important;box-sizing:border-box!important}
html body.rustic-desktop #accountCityRail #railCityList .rail-rename{color:#b17c2c!important;text-shadow:0 0 3px #ffe6a7,0 0 5px #f0c57488!important}
html body.rustic-desktop .newtk-game-dialog{position:fixed!important;inset:0!important;margin:auto!important;width:340px!important;max-width:calc(100vw - 32px)!important;height:fit-content!important;max-height:75vh!important;overflow:auto!important;box-sizing:border-box!important;padding:25px!important;border:0!important;border-radius:0!important;background:transparent url('/assets/rustic-v1045/shop-dialog.webp') center/100% 100% no-repeat!important;color:#3b2a1c!important;box-shadow:0 8px 30px #0008!important}
html body.rustic-desktop .newtk-game-dialog::backdrop{background:#0008!important}
html body.rustic-desktop .newtk-game-dialog h3{font-size:18px!important;margin:0 0 12px!important}
html body.rustic-desktop .newtk-game-dialog p{font-size:14px!important;line-height:1.45!important;margin:0 0 12px!important}
html body.rustic-desktop .newtk-game-dialog input{width:100%!important;height:30px!important;box-sizing:border-box!important;background:#f3e8ce!important;border:1px solid #9c805b!important;color:#3b2a1c!important;padding:4px 7px!important;font-size:15px!important}
html body.rustic-desktop .newtk-game-dialog-actions{display:flex!important;justify-content:center!important;gap:10px!important;margin-top:15px!important}
html body.rustic-desktop .newtk-game-dialog-actions button{width:75px!important;height:30px!important;background:url('/assets/rustic-v1045/button.webp') center/100% 100% no-repeat!important;border:0!important;color:#f2dfbd!important;font-size:14px!important;cursor:pointer!important}
/* Product information and purchase controls use explicit, consistent rows. */
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-product{display:grid!important;grid-template-columns:minmax(0,1fr)!important;justify-content:stretch!important;grid-template-rows:44px 22px 30px 1fr!important;align-content:start!important;justify-items:center!important;gap:3px!important;padding:12px 10px 10px!important;text-align:center!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-product>.tk-shop-catalog-image{width:44px!important;height:44px!important;margin:0!important;object-fit:contain!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-product>b{font-size:14px!important;font-weight:400!important;line-height:22px!important;margin:0!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-product>small{font-size:11px!important;line-height:15px!important;margin:0!important;align-self:start!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-buy-actions{display:grid!important;grid-template-columns:minmax(0,1fr)!important;justify-content:stretch!important;grid-template-rows:26px 22px 18px 26px!important;gap:3px!important;align-content:end!important;justify-items:center!important;width:100%!important;margin:0!important;padding:0!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-stepper{margin:0!important;height:26px!important;gap:5px!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-voucher-option{margin:0!important;font-size:11px!important;line-height:20px!important;gap:4px!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-price{font-size:12px!important;line-height:18px!important;margin:0!important}
html body.rustic-desktop #currencyShop.three-kingdom-shop .tk-shop-purchase{width:100%!important;height:26px!important;min-height:26px!important;margin:0!important;padding:2px 8px!important;line-height:22px!important;font-size:13px!important}
.inner-special-gate .gate-level,.inner-special-backwall .gate-level{display:none!important}
/* Readable game notices, independent of the scrollable detail panel. */
html body.rustic-desktop> #buildingActionNotice.resource-shortage,html body.rustic-desktop> #buildingActionNotice.center-warning,html body.rustic-desktop> #buildingActionNotice.center-success{display:block!important;visibility:visible!important;opacity:1!important;background:transparent url("/assets/rustic-v1045/shop-dialog.webp") center/100% 100% no-repeat!important;color:#23180f!important;text-shadow:none!important;font:16px/1.5 "DFKai-SB","標楷體",serif!important;padding:22px 28px!important;min-width:220px!important;max-width:min(420px,80vw)!important;box-sizing:border-box!important;box-shadow:0 8px 28px #0007!important;border:0!important;border-radius:0!important;animation:none!important}
html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog) .tk-shop-confirm-panel{overflow:hidden!important;background-color:transparent!important;background-size:100% 100%!important;background-clip:border-box!important;width:min(340px,calc(100% - 32px))!important;max-width:340px!important;box-sizing:border-box!important;padding:24px 26px!important}
html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog) .tk-shop-confirm-panel h3{display:block!important;width:100%!important;text-align:center!important;margin:0 0 12px!important;padding:0!important}
html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog) .tk-shop-confirm-panel::before,html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog) .tk-shop-confirm-panel::after,html body.rustic-desktop #buildingActionNotice::before,html body.rustic-desktop #buildingActionNotice::after{content:none!important;display:none!important}
html body.rustic-desktop :is(#currencyShop,#playerInventoryDialog) .tk-shop-success-panel>button{display:block!important;margin:10px auto 0!important;position:static!important;transform:none!important;float:none!important;min-width:82px!important;width:100px!important;text-align:center!important}
html body.rustic-desktop .newtk-game-dialog.tk-finish-dialog>h3{display:block!important;width:100%!important;box-sizing:border-box!important;text-align:center!important;padding:0!important;margin:0 0 12px!important}
html body.rustic-desktop #worldMapSvg image[href*="woye"]{display:none!important}