html body.rustic-desktop #playerInventoryDialog{width:min(660px,94vw)!important;max-width:660px!important;height:min(600px,62vh)!important;max-height:62vh!important;min-height:0!important;padding:25px!important;box-sizing:border-box!important;overflow:hidden!important}
html body.rustic-desktop #playerInventoryDialog[open]{display:flex!important;flex-direction:column!important;gap:7px!important}
html body.rustic-desktop #playerInventoryDialog .inv-head{flex:0 0 30px!important;height:30px!important;padding:0!important}
html body.rustic-desktop #playerInventoryDialog .inv-head h2{font-size:21px!important;margin:0!important}
html body.rustic-desktop #playerInventoryDialog .inv-bag-tabs{flex:0 0 31px!important;gap:6px!important;margin:0!important}
html body.rustic-desktop #playerInventoryDialog .inv-bag-tabs button{height:30px!important;min-height:30px!important;font-size:14px!important;padding:3px 12px!important;background:url('/assets/rustic-v1045/button.webp') center/100% 100% no-repeat!important;border:0!important;border-radius:0!important;color:#f2dfbd!important}
html body.rustic-desktop #playerInventoryDialog .inv-bag-tabs button.active{background-image:url('/assets/rustic-v1045/button-selected.webp')!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents{flex:1 1 0!important;min-height:0!important;height:0!important;overflow-y:auto!important;padding:0 5px!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-bag-item{display:grid!important;grid-template-columns:42px minmax(0,1fr) 95px 45px!important;gap:6px!important;align-items:center!important;min-height:66px!important;padding:5px 0!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-catalog-image{width:40px!important;height:40px!important;object-fit:contain!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-bag-name{font-size:13px!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-bag-description{font-size:11px!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-stepper{display:flex!important;gap:3px!important;align-items:center!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-stepper button{width:23px!important;min-width:23px!important;height:25px!important;padding:0!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-stepper input{width:40px!important;min-width:0!important;height:23px!important;padding:1px!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-bag-item>button{width:43px!important;min-width:43px!important;height:26px!important;padding:2px!important;font-size:13px!important}
html body.rustic-desktop :is(#playerInventoryDialog,#currencyShop) .tk-bag-name-sort{display:block!important;flex:0 0 27px!important;min-height:27px!important;height:27px!important;width:110px!important;padding:3px 9px!important;margin:2px 0 7px auto!important;background:url('/assets/rustic-v1045/button.webp') center/100% 100% no-repeat!important;color:#f2dfbd!important;border:0!important;border-radius:0!important;font-size:13px!important;cursor:pointer!important}
/* Keep sorting on the tab line and items close to their heading. */
html body.rustic-desktop #playerInventoryDialog .inv-bag-tabs{align-items:center!important;padding:4px 5px 6px!important}
html body.rustic-desktop #playerInventoryDialog .inv-bag-tabs>.tk-bag-name-sort{margin:0 0 0 auto!important;flex:0 0 110px!important;align-self:center!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents>h3{margin:6px 0 8px!important;padding:0!important;line-height:1.3!important;min-height:0!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents>.tk-shop-bag-rows{margin:0!important;padding-top:0!important}
/* Match the centered heading and control treatment of the ranking and quest dialogs. */
html body.rustic-desktop #playerInventoryDialog .inv-head{
 display:grid!important;grid-template-columns:34px minmax(0,1fr) 34px;align-items:center!important;gap:8px!important;
 flex:0 0 auto!important;height:auto!important;padding:5px 8px!important;margin:0 0 5px!important;
 border:1px solid #756653!important;border-radius:5px!important;
 background:linear-gradient(#38332c,#191714)!important;box-shadow:inset 0 0 0 2px #151310!important;
}
html body.rustic-desktop #playerInventoryDialog .inv-head h2{
 grid-column:2;text-align:center;color:#f6e3bb!important;font-size:24px!important;
 letter-spacing:.24em;text-indent:.24em;padding:0!important;background:none!important;
}
html body.rustic-desktop #playerInventoryDialog .inv-head #closeInventoryDialog{
 grid-column:3;position:static!important;width:34px!important;height:33px!important;min-height:33px!important;
 padding:0!important;margin:0!important;border:1px solid #846a4e!important;border-radius:3px!important;
 color:#f6e3bb!important;font-size:20px!important;
 background:#38281d url('/assets/rustic-v1045/button.webp') center/100% 100% no-repeat!important;
}
html body.rustic-desktop #playerInventoryDialog .inv-bag-tabs{
 flex:0 0 auto!important;height:auto!important;flex-wrap:wrap!important;gap:5px!important;padding:0!important;
}
html body.rustic-desktop #playerInventoryDialog .inv-bag-tabs button{
 height:33px!important;min-height:33px!important;padding:4px 8px!important;border:1px solid #846a4e!important;
 border-radius:3px!important;color:#f6e3bb!important;
}
html body.rustic-desktop #playerInventoryDialog .inv-bag-tabs button[data-bag-type]{flex:1 1 54px!important;white-space:nowrap}
html body.rustic-desktop #playerInventoryDialog .inv-bag-tabs button.active{
 border-color:#ddbd80!important;box-shadow:inset 0 0 0 1px #ddbd80!important;
}
/* V1356: compact shop inventory rows to match Treasure Pavilion density. */
html body.rustic-desktop #playerInventoryDialog .tk-shop-bag-rows{display:block!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-bag-item{min-height:52px!important;height:auto!important;grid-template-columns:42px minmax(0,1fr) 95px 45px!important;column-gap:7px!important;row-gap:0!important;padding:4px 2px!important;margin:0!important;align-content:center!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-bag-item .tk-shop-catalog-image{width:39px!important;height:39px!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-bag-info{gap:2px!important;margin:0!important;padding:0!important;min-height:0!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-bag-name{line-height:1.3!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-bag-description{line-height:1.25!important;margin:0!important}
/* V1365: compact list must not distribute rows across the full scroll height. */
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;align-content:flex-start!important;align-items:stretch!important;gap:0!important;height:auto!important;min-height:0!important;grid-auto-rows:auto!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item{display:grid!important;flex:0 0 auto!important;align-self:stretch!important;min-height:0!important;height:auto!important;max-height:none!important;padding:5px 2px!important;margin:0!important;grid-template-columns:42px minmax(0,1fr) 95px 45px!important;align-items:center!important;align-content:center!important;gap:0 7px!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item .tk-shop-bag-info{flex:initial!important;min-height:0!important;align-self:center!important}
/* V1366: remove remaining excess vertical padding from shop-bag rows. */
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item{padding:2px 2px!important;min-height:0!important;line-height:1.15!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item .tk-shop-catalog-image{width:36px!important;height:36px!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item .tk-shop-bag-info{gap:0!important}
/* V1367: the marked blue space is the unused middle column, not vertical row spacing. */
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item{grid-template-columns:42px minmax(0,1fr) 95px 45px!important;column-gap:6px!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item .tk-shop-bag-info{max-width:none!important;width:auto!important}
/* V1372: move the quantity stepper next to the item instead of across an empty middle column. */
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item{width:min(100%,495px)!important;max-width:495px!important;grid-template-columns:42px minmax(0,1fr) 95px 45px!important;column-gap:5px!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item .tk-shop-stepper{justify-self:start!important}
/* V1374: center the entire compact item row, not just shrink its right edge. */
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item{width:min(100%,495px)!important;max-width:495px!important;margin-left:auto!important;margin-right:auto!important;justify-self:center!important}
/* V1376: larger merchandise art and about seven visible items per scroll page. */
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item{width:min(100%,550px)!important;max-width:550px!important;min-height:70px!important;height:70px!important;box-sizing:border-box!important;grid-template-columns:62px minmax(0,1fr) 95px 45px!important;column-gap:7px!important;padding:5px 3px!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item .tk-shop-catalog-image{width:56px!important;height:56px!important;max-width:56px!important;max-height:56px!important;object-fit:contain!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item .tk-shop-bag-name{font-size:15px!important;line-height:1.3!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item .tk-shop-bag-description{font-size:12px!important;line-height:1.3!important}
/* V1377: readable text and truly centered stepper numerals. */
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item .tk-shop-bag-name{font-size:17px!important;line-height:1.4!important}
html body.rustic-desktop #playerInventoryDialog #playerInventoryContents .tk-shop-bag-rows>.tk-shop-bag-item .tk-shop-bag-description{font-size:14px!important;line-height:1.4!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-stepper input{height:29px!important;line-height:27px!important;text-align:center!important;box-sizing:border-box!important;padding:0!important;font-size:15px!important;vertical-align:middle!important}
html body.rustic-desktop #playerInventoryDialog .tk-shop-stepper button{height:29px!important;line-height:29px!important;text-align:center!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0!important}