/* TCQ v0.10.7.65.6 — inventory / chest / wardrobe only.
   Wood appearance inspired by the player's supplied screenshot; all gameplay buttons
   retain their existing data-action hooks and the catalog's genuine source sprites. */
#inventorySheet,#shopModal.tcq-wood-wardrobe{--tcqw-wood:#47240f;--tcqw-dark:#291407;--tcqw-edge:#ab7236;--tcqw-gold:#f4d498;--tcqw-paper:#f8e6bd;--tcqw-shadow:#160c07;color:var(--tcqw-paper)!important;}
#inventorySheet .inventory-panel,#shopModal.shop-v2.tcq-wood-wardrobe{
  background:repeating-linear-gradient(0deg,transparent 0px,transparent 19px,rgba(18,9,3,.13) 20px,rgba(255,199,112,.055) 21px,transparent 22px),linear-gradient(95deg,#5c3019,#391d0b 45%,#53290f 100%)!important;
  border:3px solid #9e6b39!important;border-radius:5px!important;
  box-shadow:inset 0 0 0 2px #1e0e06,inset 0 0 0 5px #764522,0 15px 45px #000a!important;
}
#inventorySheet .inventory-panel::before{border:1px solid #a87942!important;border-radius:0!important;inset:7px!important;}
#inventorySheet .tcq-panel-head{border-bottom:2px solid #936034!important;margin:0 0 8px!important;padding:0 2px 6px!important;}
#inventorySheet .tcq-panel-head h2{color:#f8dea6!important;font:900 clamp(17px,2.5vw,23px)/1.2 'TCQPixel',sans-serif!important;}
#inventorySheet .tcq-panel-head .tcq-close,#shopModal.tcq-wood-wardrobe #shopClose{
  background:linear-gradient(#bb7348,#74351a)!important;color:#fff0c9!important;border:2px solid #e6b775!important;border-radius:3px!important;box-shadow:inset 0 0 0 1px #542410!important;
}
#inventorySheet .inventory-panel{width:min(890px,97vw)!important;height:min(610px,94%)!important;max-height:94%!important;grid-template-rows:auto minmax(0,1fr)!important;}
#inventorySheetBody{height:100%!important;min-height:0!important;overflow:hidden!important;padding:0 1px 1px!important;scrollbar-width:none!important;}
#inventorySheetBody *::-webkit-scrollbar,#shopModal.tcq-wood-wardrobe *::-webkit-scrollbar{display:none!important;}
#inventorySheetBody * ,#shopModal.tcq-wood-wardrobe * {scrollbar-width:none;}
.tcq-bag-layout{display:grid;grid-template-columns:minmax(175px,205px) minmax(0,1fr);gap:9px;height:100%;min-height:0;}
.tcq-bag-character{min-height:0;display:flex;flex-direction:column;gap:7px;padding:8px;border:2px solid #a97946;background:linear-gradient(#61371e,#321805);box-shadow:inset 0 0 0 2px #2a150a;color:#f4dbab;overflow:auto;}
.tcq-bag-caption{font:900 11px/1.2 'TCQPixel',sans-serif;letter-spacing:.07em;color:#ffe3a4;text-align:center;}
.tcq-bag-avatar-box{min-height:178px;display:grid;grid-template-columns:30px minmax(0,1fr) 30px;gap:3px;padding:8px 4px;align-items:center;background:linear-gradient(110deg,#617c46 0%,#a4bd76 49%,#566f40 100%);border:3px solid #c69a5d;box-shadow:inset 0 0 0 2px #30482d;}
.tcq-bag-slot-column{display:grid;gap:5px;align-content:space-evenly;height:100%;min-height:138px;}
.tcq-bag-equip{display:grid;place-items:center;aspect-ratio:1;border:1px solid #ddbf84;background:#462b19;box-shadow:inset 0 0 0 1px #211208;font-size:12px;color:#c49b5d;}
.tcq-bag-equip b{font-size:8px;color:#fff1c0;font-weight:800;}
#tcqBagPortrait{display:block;object-fit:contain;image-rendering:pixelated;width:100%;max-height:160px;height:auto;}
.tcq-bag-stats{display:grid;gap:4px;padding:6px 0;border-top:1px solid #976337;border-bottom:1px solid #976337;}
.tcq-bag-stats>div{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:11px;}
.tcq-bag-stats strong{color:#b8ec95;font-size:12px;font-variant-numeric:tabular-nums;}
#inventorySheet .tcq-bag-secondary{background:#764422!important;border:2px solid #cb985a!important;color:#ffe0a2!important;border-radius:2px!important;font-weight:900!important;min-height:32px;padding:5px 7px!important;}
.tcq-bag-wallet{margin-top:auto;border-top:1px solid #80502c;padding:6px 0 0;text-align:center;font-weight:900;color:#f3cf75;font-size:11px;}
.tcq-bag-content{display:flex;flex-direction:column;gap:6px;min-width:0;min-height:0;overflow:hidden;}
#inventorySheet .tcq-bag-tabs.inventory-tabs{position:static!important;display:flex!important;gap:6px!important;margin:0!important;padding:1px 0!important;background:transparent!important;flex:0 0 auto;}
#inventorySheet .tcq-bag-tabs button{display:flex!important;justify-content:center!important;gap:7px!important;flex:1;min-width:0!important;min-height:34px!important;height:36px!important;border:2px solid #c6975f!important;border-radius:2px!important;color:#fce2af!important;background:linear-gradient(#653719,#42220d)!important;box-shadow:inset 0 0 0 1px #2c1409!important;padding:4px 7px!important;}
#inventorySheet .tcq-bag-tabs button span{font-size:17px!important;}
#inventorySheet .tcq-bag-tabs button b{font-size:12px!important;}
#inventorySheet .tcq-bag-tabs button small{font-size:9px!important;color:#d6ab70!important;}
#inventorySheet .tcq-bag-tabs button.active{background:linear-gradient(#a46c38,#754217)!important;color:#fff5c4!important;box-shadow:inset 0 0 0 1px #e2bc78!important;}
#inventorySheet .tcq-bag-tabs button:disabled{opacity:.5!important;}
.tcq-bag-headline{display:flex;justify-content:space-between;align-items:center;gap:5px;padding:4px 8px;background:#301707;border:1px solid #8c603a;color:#efd09d;font-size:11px;font-weight:900;}
.tcq-bag-filters{display:flex;align-items:center;gap:5px;overflow-x:auto;flex:0 0 auto;white-space:nowrap;overscroll-behavior:contain;}
#inventorySheet .tcq-bag-filters button{flex:0 0 auto;padding:5px 9px!important;min-height:30px!important;border:1px solid #a97b47!important;border-radius:2px!important;background:#482611!important;color:#dfb988!important;font-weight:850!important;font-size:10px!important;}
#inventorySheet .tcq-bag-filters button.active{background:#ad7540!important;color:#291506!important;border-color:#f1ce87!important;}
.tcq-bag-grid{flex:1 1 auto;min-height:88px;overflow-y:auto;overscroll-behavior:contain;display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));grid-auto-rows:88px;align-content:start;gap:4px;padding:6px;background:rgba(27,12,4,.66);border:2px solid #926034;box-shadow:inset 0 0 0 2px #3c2111;}
#inventorySheet .tcq-bag-tile{position:relative;display:flex!important;flex-direction:column;align-items:center;justify-content:space-between;gap:2px;min-width:0;height:88px!important;min-height:0!important;padding:6px 3px 3px!important;border:1px solid #90613e!important;border-radius:1px!important;background:linear-gradient(135deg,#553119,#331908)!important;color:#f9e4b6!important;box-shadow:inset 0 1px 0 #6f4627!important;cursor:pointer;text-align:center;}
#inventorySheet .tcq-bag-tile.selected{border:2px solid #ffe099!important;background:linear-gradient(135deg,#87542d,#48260e)!important;box-shadow:0 0 0 1px #dcad55,inset 0 0 0 1px #5f310d!important;}
.tcq-bag-tile-art{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;}
.tcq-bag-tile-art img,.tcq-bag-inspector-icon img{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;}
.tcq-bag-tile-art>span{font-size:26px;}
.tcq-bag-tile-count{position:absolute;right:3px;top:2px;background:#201006bb;color:#fff1b4;font:bold 10px system-ui;padding:0px 3px;}
.tcq-bag-tile-name{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#f5ddb6;font-size:9px;font-weight:800;line-height:1.1;}
.tcq-bag-inspector{flex:0 0 auto;min-height:84px;display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px;background:#301706;border:2px solid #a97847;box-shadow:inset 0 0 0 1px #5b3216;}
.tcq-bag-inspector-icon{display:grid;place-items:center;width:48px;height:48px;border:1px solid #946237;background:#5c3417;color:#fce5b5;font-size:27px;}
.tcq-bag-inspector-copy{min-width:0;display:grid;gap:3px;}
.tcq-bag-inspector-copy>small{color:#d1a775;font-size:9px;}
.tcq-bag-inspector-copy>strong{font-size:13px;color:#fff0c6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.tcq-bag-inspector-copy>p{margin:0;max-height:33px;overflow:auto;font-size:10px;line-height:1.3;color:#e2c79e;}
.tcq-bag-holdings{display:flex;gap:10px;color:#e1b987;font-size:10px;}
.tcq-bag-item-actions{display:grid;gap:5px;align-content:center;}
#inventorySheet .tcq-bag-item-actions button{min-height:28px!important;min-width:80px;padding:4px 7px!important;border:1px solid #e1b277!important;background:linear-gradient(#966132,#653719)!important;color:#fff0cc!important;border-radius:2px!important;font-weight:900!important;font-size:10px!important;}
#inventorySheet .tcq-bag-item-actions button:disabled{opacity:.38!important;}
.tcq-bag-notice{font-size:9px;color:#caab81;text-align:center;line-height:1.2;}
.tcq-bag-empty{margin:auto!important;color:#e3c49b;text-align:center;grid-column:1/-1;font-size:12px;}
#inventorySheet .inventory-fishing{padding:5px 7px!important;border:1px solid #9b673c!important;color:#f8e4bf!important;background:#3e2110!important;font-size:11px!important;}
#inventorySheet .inventory-fishing summary{color:#fff0c6!important;}
#inventorySheet .inventory-section{margin:0!important;padding:0!important;background:transparent!important;border:0!important;}
/* The real source wardrobe uses the existing canvas Item/Part renderer. */
#shopModal.shop-v2.tcq-wood-wardrobe{inset:8px!important;width:auto!important;height:calc(100% - 16px)!important;max-height:none!important;display:grid!important;grid-template-rows:auto auto auto minmax(0,1fr) auto!important;gap:5px!important;padding:8px!important;overflow:hidden!important;}
#shopModal.tcq-wood-wardrobe .shop-head{background:#38200f!important;border-bottom:2px solid #a47742!important;min-height:35px!important;padding:3px 7px!important;}
#shopModal.tcq-wood-wardrobe .shop-head strong{color:#ffe1ad!important;font-size:19px!important;}
#shopModal.tcq-wood-wardrobe .shop-head small,#shopModal.tcq-wood-wardrobe .shop-kicker{color:#c9a178!important;}
#shopModal.tcq-wood-wardrobe .shop-wallet-row,#shopModal.tcq-wood-wardrobe .shop-wallet{background:none!important;}
#shopModal.tcq-wood-wardrobe .wallet-chip{background:#392010!important;border:1px solid #94643c!important;color:#f8d9ae!important;box-shadow:none!important;}
#shopModal.tcq-wood-wardrobe .wallet-chip b,#shopModal.tcq-wood-wardrobe .wallet-chip small{color:#f1cca0!important;}
#shopModal.tcq-wood-wardrobe .shop-primary-nav{background:none!important;}
#shopModal.tcq-wood-wardrobe .shop-primary-nav button{background:#553018!important;border:2px solid #a77a49!important;color:#e4c39b!important;border-radius:2px!important;box-shadow:none!important;}
#shopModal.tcq-wood-wardrobe .shop-primary-nav button.active{background:#946331!important;color:#fff4cc!important;border-color:#ebca88!important;}
#shopModal.tcq-wood-wardrobe .shop-content-layout{grid-template-columns:minmax(192px,31%) minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;gap:7px!important;min-height:0!important;}
#shopModal.tcq-wood-wardrobe .shop-detail{height:100%!important;max-height:none!important;min-width:0!important;display:flex!important;flex-direction:column!important;gap:5px!important;padding:7px!important;overflow:auto!important;background:#371b0c!important;border:2px solid #a67846!important;border-radius:2px!important;color:#efd3aa!important;}
#shopModal.tcq-wood-wardrobe .shop-detail-preview{width:100%!important;height:170px!important;max-height:170px!important;flex:0 0 170px!important;min-height:0!important;display:grid!important;place-items:center!important;padding:7px!important;background:linear-gradient(120deg,#6b8452,#9bbb81,#587246)!important;border:2px solid #bd9255!important;border-radius:2px!important;}
#shopModal.tcq-wood-wardrobe .shop-detail-preview-frame{width:100%!important;height:100%!important;min-height:0!important;display:grid!important;place-items:center!important;}
#shopModal.tcq-wood-wardrobe #shopDetailPreview{width:auto!important;height:100%!important;max-width:100%!important;object-fit:contain!important;image-rendering:pixelated!important;}
#shopModal.tcq-wood-wardrobe .shop-detail-copy{min-height:0!important;max-height:none!important;flex:1 1 auto!important;overflow:auto!important;display:block!important;color:#efdbb6!important;}
#shopModal.tcq-wood-wardrobe .wardrobe-preview-state,#shopModal.tcq-wood-wardrobe .wardrobe-equipped-head,#shopModal.tcq-wood-wardrobe .wardrobe-selected-line{display:block!important;color:#f5d6a5!important;}
#shopModal.tcq-wood-wardrobe .wardrobe-equipped-list{display:flex!important;flex-wrap:wrap!important;gap:3px!important;max-height:none!important;overflow:visible!important;margin:5px 0!important;}
#shopModal.tcq-wood-wardrobe .wardrobe-equipped-row{display:inline-flex!important;max-width:100%!important;min-width:0!important;padding:4px 6px!important;gap:4px!important;overflow:hidden!important;background:#492714!important;border:1px solid #9a683e!important;color:#eed4b0!important;white-space:normal!important;border-radius:2px!important;font-size:10px!important;}
#shopModal.tcq-wood-wardrobe .wardrobe-equipped-row.selected{background:#93612e!important;color:#fff0be!important;}
#shopModal.tcq-wood-wardrobe .wardrobe-selected-line{padding:5px!important;background:#43230f!important;border:1px solid #986539!important;border-radius:2px!important;}
#shopModal.tcq-wood-wardrobe .wardrobe-selected-line b,#shopModal.tcq-wood-wardrobe .wardrobe-selected-line span,#shopModal.tcq-wood-wardrobe .wardrobe-selected-line small{color:#fff0cc!important;}
#shopModal.tcq-wood-wardrobe .tcq-wood-item-desc{font-size:10px;color:#dcc39e;padding:4px 0;line-height:1.35;}
#shopModal.tcq-wood-wardrobe .tcq-wood-forge{display:grid;gap:5px;border-top:1px solid #8c5e37;margin-top:4px;padding-top:5px;}
#shopModal.tcq-wood-wardrobe .tcq-wood-forge>b{color:#f7df99;font-size:11px;}
#shopModal.tcq-wood-wardrobe .tcq-wood-forge>div{display:grid;gap:2px;padding:5px;border:1px solid #88613d;background:#30180a;}
#shopModal.tcq-wood-wardrobe .tcq-wood-forge :is(small,strong,span,em){color:#ead9b6!important;font-size:10px!important;font-style:normal;}
#shopModal.tcq-wood-wardrobe .tcq-wood-forge strong{color:#a8ee9a!important;}
#shopModal.tcq-wood-wardrobe .tcq-wood-forge-none{color:#c9a47d;font-size:10px;}
#shopModal.tcq-wood-wardrobe .tcq-item-combat-stats{background:#392011!important;border:1px solid #916337!important;color:#f2d6a0!important;padding:5px!important;}
#shopModal.tcq-wood-wardrobe .tcq-item-stat-tags span{background:#2b170b!important;color:#a8eea4!important;}
#shopModal.tcq-wood-wardrobe .shop-detail-actions{display:flex!important;flex-direction:column!important;gap:5px!important;min-height:0!important;flex:0 0 auto!important;}
#shopModal.tcq-wood-wardrobe .shop-detail-actions button{width:100%!important;flex:0 0 auto!important;min-height:33px!important;height:auto!important;padding:5px!important;border:2px solid #c4955c!important;border-radius:2px!important;background:#9b6736!important;color:#fff0c7!important;box-shadow:none!important;font-size:11px!important;}
#shopModal.tcq-wood-wardrobe .shop-detail-actions button:disabled{background:#51321c!important;color:#af916c!important;}
#shopModal.tcq-wood-wardrobe .shop-browser{display:grid!important;grid-template-rows:auto auto minmax(0,1fr)!important;min-height:0!important;gap:4px!important;overflow:hidden!important;border:2px solid #90613b!important;padding:5px!important;background:#331a0b!important;}
#shopModal.tcq-wood-wardrobe .shop-collection-heading{background:none!important;color:#ebc697!important;height:auto!important;min-height:24px!important;}
#shopModal.tcq-wood-wardrobe .shop-collection-heading h3{font-size:13px!important;color:#fce6b1!important;}
#shopModal.tcq-wood-wardrobe .shop-collection-heading>strong{font-size:10px!important;color:#e0bf84!important;background:#5f351b!important;border:1px solid #8b5d2e!important;}
#shopModal.tcq-wood-wardrobe .shop-toolbar{display:grid!important;grid-template-rows:auto auto auto!important;grid-template-columns:minmax(0,1fr)!important;gap:4px!important;height:auto!important;overflow:visible!important;}
#shopModal.tcq-wood-wardrobe .shop-filters,#shopModal.tcq-wood-wardrobe .shop-state-filters{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;gap:4px!important;min-height:28px!important;height:28px!important;padding:0!important;}
#shopModal.tcq-wood-wardrobe .shop-filters button,#shopModal.tcq-wood-wardrobe .shop-state-filters button{flex:0 0 auto!important;min-height:26px!important;height:26px!important;padding:3px 7px!important;border:1px solid #996839!important;background:#4c2a14!important;color:#eed4ad!important;border-radius:2px!important;box-shadow:none!important;font-size:10px!important;}
#shopModal.tcq-wood-wardrobe .shop-filters button.active,#shopModal.tcq-wood-wardrobe .shop-state-filters button.active{background:#ae783a!important;color:#241308!important;}
#shopModal.tcq-wood-wardrobe .shop-query{display:grid!important;grid-template-columns:minmax(0,1fr) 110px!important;gap:5px!important;height:31px!important;}
#shopModal.tcq-wood-wardrobe .shop-search-wrap,#shopModal.tcq-wood-wardrobe #shopSort{height:30px!important;min-height:30px!important;background:#422514!important;border:1px solid #a77b4f!important;color:#f2dab3!important;border-radius:2px!important;}
#shopModal.tcq-wood-wardrobe #shopSearch{height:28px!important;min-height:28px!important;color:#f2dab3!important;font-size:12px!important;}
#shopModal.tcq-wood-wardrobe #shopSearch::placeholder{color:#b79770!important;}
#shopModal.tcq-wood-wardrobe .shop-list-pane{display:grid!important;grid-template-rows:minmax(0,1fr) 30px!important;min-height:0!important;gap:3px!important;overflow:hidden!important;}
#shopModal.tcq-wood-wardrobe .shop-grid{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(87px,1fr))!important;grid-auto-rows:111px!important;gap:4px!important;padding:3px!important;overflow-y:auto!important;align-content:start!important;min-height:0!important;background:#251306!important;border:1px solid #875d37!important;}
#shopModal.tcq-wood-wardrobe .shop-card{height:111px!important;min-height:0!important;display:flex!important;flex-direction:column!important;gap:2px!important;padding:4px!important;background:linear-gradient(130deg,#5b331a,#391c0d)!important;border:1px solid #98663b!important;border-radius:1px!important;box-shadow:none!important;color:#efdab7!important;}
#shopModal.tcq-wood-wardrobe .shop-card.is-selected{border:2px solid #ffe5a1!important;background:#734421!important;}
#shopModal.tcq-wood-wardrobe .shop-thumb{width:100%!important;height:66px!important;min-height:0!important;flex:0 0 66px!important;padding:1px!important;background:#714222!important;border:0!important;border-radius:0!important;}
#shopModal.tcq-wood-wardrobe .shop-thumb canvas{width:100%!important;height:100%!important;object-fit:contain!important;image-rendering:pixelated!important;}
#shopModal.tcq-wood-wardrobe .shop-card-state{position:absolute!important;top:1px!important;left:1px!important;font-size:7px!important;padding:2px 3px!important;max-width:94%!important;}
#shopModal.tcq-wood-wardrobe .fashion-item-copy{flex:1!important;min-height:0!important;display:block!important;overflow:hidden!important;}
#shopModal.tcq-wood-wardrobe .shop-card-type,#shopModal.tcq-wood-wardrobe .shop-card-source,#shopModal.tcq-wood-wardrobe .tcq-item-card-stat{display:none!important;}
#shopModal.tcq-wood-wardrobe .fashion-item-copy strong{display:block!important;font-size:10px!important;line-height:1.15!important;min-height:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;color:#f9d9ad!important;}
#shopModal.tcq-wood-wardrobe .fashion-item-copy small{color:#d0b18a!important;font-size:8px!important;}
/* Equip control remains in detail pane; grid tile click selects it. */
#shopModal.tcq-wood-wardrobe .shop-card-action{display:none!important;}
#shopModal.tcq-wood-wardrobe .shop-pager{height:30px!important;min-height:30px!important;color:#edcba2!important;}
#shopModal.tcq-wood-wardrobe .shop-pager button{height:28px!important;min-height:28px!important;border:1px solid #b37e43!important;background:#684019!important;color:#f8e2be!important;border-radius:2px!important;}
#shopModal.tcq-wood-wardrobe #shopWorkshopLink{display:none!important;}
#shopModal.tcq-wood-wardrobe #shopNote{display:none!important;}
@media(max-width:760px){
  #inventorySheet{padding:3px!important;}
  #inventorySheet .inventory-panel{width:100%!important;height:100%!important;max-height:100%!important;padding:7px!important;}
  #inventorySheet .tcq-panel-head{min-height:30px!important;margin-bottom:4px!important;padding-bottom:3px!important;}
  #inventorySheet .tcq-panel-head h2{font-size:17px!important;}
  .tcq-bag-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:112px minmax(0,1fr);gap:5px;}
  .tcq-bag-character{display:grid;grid-template-columns:110px minmax(0,1fr) 90px;grid-template-rows:21px 1fr;gap:3px 6px;padding:4px 5px;overflow:hidden;}
  .tcq-bag-caption{grid-column:1;grid-row:1;align-self:center;font-size:10px;}
  .tcq-bag-avatar-box{grid-column:1;grid-row:2;min-height:0;height:81px;grid-template-columns:16px minmax(0,1fr) 16px;padding:2px;gap:1px;border-width:1px;}
  .tcq-bag-slot-column{min-height:0;height:100%;gap:1px;}
  .tcq-bag-equip{font-size:7px;}.tcq-bag-equip b{font-size:5px;}
  #tcqBagPortrait{height:75px;max-height:75px;width:100%;}
  .tcq-bag-stats{grid-column:2;grid-row:1/3;align-self:center;padding:2px 0;gap:3px;}
  .tcq-bag-stats>div{font-size:10px;}.tcq-bag-stats strong{font-size:10px;}
  #inventorySheet .tcq-bag-secondary{grid-column:3;grid-row:2;align-self:start;min-height:31px;font-size:9px;padding:4px!important;}
  .tcq-bag-wallet{grid-column:3;grid-row:1;align-self:center;margin:0;padding:0;font-size:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:0;}
  #inventorySheet .tcq-bag-tabs button{height:31px!important;min-height:31px!important;}
  #inventorySheet .tcq-bag-tabs button b{font-size:10px!important;}
  #inventorySheet .tcq-bag-tabs button span{font-size:14px!important;}
  #inventorySheet .tcq-bag-tabs button small{font-size:7px!important;}
  .tcq-bag-headline{font-size:9px;padding:3px 6px;}
  .tcq-bag-filters{gap:3px;}
  #inventorySheet .tcq-bag-filters button{font-size:9px!important;padding:3px 6px!important;min-height:27px!important;}
  .tcq-bag-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:78px;gap:3px;padding:4px;}
  #inventorySheet .tcq-bag-tile{height:78px!important;padding:3px 1px 2px!important;}
  .tcq-bag-tile-art{width:34px;height:34px;flex-basis:34px;}
  .tcq-bag-tile-art>span{font-size:22px;}.tcq-bag-tile-name{font-size:8px;}
  .tcq-bag-inspector{grid-template-columns:38px minmax(0,1fr);gap:4px;min-height:74px;padding:4px;}
  .tcq-bag-inspector-icon{width:36px;height:36px;}
  .tcq-bag-inspector-copy>strong{font-size:11px;}
  .tcq-bag-inspector-copy>p{font-size:9px;max-height:26px;}
  .tcq-bag-item-actions{grid-column:1/-1;display:flex;gap:4px;}
  #inventorySheet .tcq-bag-item-actions button{min-height:25px!important;min-width:0;flex:1;font-size:9px!important;}
  .tcq-bag-notice{font-size:8px;}
  #shopModal.shop-v2.tcq-wood-wardrobe{inset:2px!important;height:calc(100% - 4px)!important;padding:5px!important;gap:3px!important;grid-template-rows:33px 33px 32px minmax(0,1fr)!important;}
  #shopModal.tcq-wood-wardrobe .shop-head{height:33px!important;min-height:33px!important;}
  #shopModal.tcq-wood-wardrobe .shop-head strong{font-size:15px!important;}
  #shopModal.tcq-wood-wardrobe .shop-wallet-row{height:33px!important;min-height:33px!important;}
  #shopModal.tcq-wood-wardrobe .wallet-chip{min-height:31px!important;height:31px!important;padding:2px!important;}
  #shopModal.tcq-wood-wardrobe .shop-primary-nav,#shopModal.tcq-wood-wardrobe .shop-primary-nav button{min-height:31px!important;height:31px!important;}
  #shopModal.tcq-wood-wardrobe .shop-content-layout{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:140px minmax(0,1fr)!important;gap:4px!important;}
  #shopModal.tcq-wood-wardrobe .shop-detail{display:grid!important;grid-template-columns:105px minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr) 31px!important;gap:4px!important;max-height:140px!important;padding:4px!important;overflow:hidden!important;}
  #shopModal.tcq-wood-wardrobe .shop-detail-preview{grid-column:1!important;grid-row:1/3!important;min-height:0!important;max-height:none!important;height:100%!important;flex:initial!important;padding:3px!important;width:100%!important;}
  #shopModal.tcq-wood-wardrobe .shop-detail-preview canvas{height:100%!important;width:100%!important;}
  #shopModal.tcq-wood-wardrobe .shop-detail-copy{grid-column:2!important;grid-row:1!important;min-height:0!important;max-height:none!important;overflow:auto!important;}
  #shopModal.tcq-wood-wardrobe .wardrobe-preview-state,#shopModal.tcq-wood-wardrobe .wardrobe-equipped-head{display:none!important;}
  #shopModal.tcq-wood-wardrobe .wardrobe-equipped-list{max-height:none!important;flex-wrap:wrap!important;}
  #shopModal.tcq-wood-wardrobe .wardrobe-equipped-row{font-size:8px!important;padding:2px 3px!important;}
  #shopModal.tcq-wood-wardrobe .wardrobe-selected-line{display:block!important;font-size:9px;}
  #shopModal.tcq-wood-wardrobe .tcq-wood-forge>div{padding:2px!important;}
  #shopModal.tcq-wood-wardrobe .tcq-wood-forge :is(small,strong,span,em){font-size:8px!important;}
  #shopModal.tcq-wood-wardrobe .tcq-item-combat-stats{font-size:8px!important;padding:2px!important;}
  #shopModal.tcq-wood-wardrobe .shop-detail-actions{grid-column:2!important;grid-row:2!important;flex-direction:row!important;gap:4px!important;}
  #shopModal.tcq-wood-wardrobe .shop-detail-actions button{min-height:29px!important;height:29px!important;font-size:9px!important;padding:3px!important;}
  #shopModal.tcq-wood-wardrobe .shop-browser{grid-template-rows:20px auto minmax(0,1fr)!important;gap:3px!important;padding:3px!important;}
  #shopModal.tcq-wood-wardrobe .shop-collection-heading{height:20px!important;min-height:20px!important;}
  #shopModal.tcq-wood-wardrobe .shop-collection-heading h3{font-size:11px!important;}
  #shopModal.tcq-wood-wardrobe .shop-toolbar{grid-template-rows:26px 26px 30px!important;gap:2px!important;}
  #shopModal.tcq-wood-wardrobe .shop-filters,#shopModal.tcq-wood-wardrobe .shop-state-filters{height:26px!important;min-height:26px!important;}
  #shopModal.tcq-wood-wardrobe .shop-filters button,#shopModal.tcq-wood-wardrobe .shop-state-filters button{height:25px!important;min-height:25px!important;font-size:9px!important;}
  #shopModal.tcq-wood-wardrobe .shop-query{height:29px!important;grid-template-columns:minmax(0,1fr) 86px!important;}
  #shopModal.tcq-wood-wardrobe #shopSort,#shopModal.tcq-wood-wardrobe .shop-search-wrap{height:28px!important;min-height:28px!important;}
  #shopModal.tcq-wood-wardrobe #shopSearch{height:27px!important;min-height:27px!important;font-size:10px!important;}
  #shopModal.tcq-wood-wardrobe .shop-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-rows:91px!important;gap:3px!important;}
  #shopModal.tcq-wood-wardrobe .shop-card{height:91px!important;min-height:0!important;}
  #shopModal.tcq-wood-wardrobe .shop-thumb{height:56px!important;flex-basis:56px!important;}
  #shopModal.tcq-wood-wardrobe .fashion-item-copy strong{font-size:9px!important;}
}
@media(max-width:355px){
  .tcq-bag-character{grid-template-columns:90px minmax(0,1fr) 76px;}
  #inventorySheet .tcq-bag-secondary{font-size:8px!important;}
  .tcq-bag-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  #shopModal.tcq-wood-wardrobe .shop-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
}
/* The wardrobe class persists when closing; the native hidden state must still win. */
#shopModal.shop-v2.tcq-wood-wardrobe[hidden]{display:none!important;}

#shopModal.tcq-wood-wardrobe .shop-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:9px!important;}
#shopModal.tcq-wood-wardrobe .shop-head-copy{min-width:0!important;flex:1 1 auto!important;}
#shopModal.tcq-wood-wardrobe #shopClose{margin-left:auto!important;flex:0 0 32px!important;width:32px!important;height:32px!important;min-height:32px!important;}

.tcq-bag-equip{position:relative;overflow:hidden;}
.tcq-bag-equip canvas{width:100%;height:100%;display:block;image-rendering:pixelated;object-fit:contain;}
.tcq-bag-equip b{position:absolute;bottom:0;right:0;padding:0 1px;background:#2c170cd9;font-size:6px;color:#fff3c4;text-shadow:0 1px 2px #000;line-height:1.1;}

/* Readable labels; unidentified materials use text rather than an unrelated gift. */
#inventorySheet .tcq-bag-tile-name{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:16px;line-height:1;min-height:30px;}
#inventorySheet .tcq-material-badge{font:20px TCQPixel,monospace;color:#fff1b4;border:2px solid #d3ad64;background:#493921;padding:4px;}
