.packBar,
.bagGroup,
.priceRow,
.purse,
.shopHead,
.lootActions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.packBar {
  border: 1px solid #63543d;
  background: #21231c;
  padding: 5px 12px;
  margin: 0 0 10px;
  min-height: 49px;
  gap: 18px;
  flex-wrap: wrap;
  color: #e6d8b9;
}
.bagGroup {
  flex-wrap: wrap;
  gap: 5px;
}
.bagGroup > b {
  font-size: 0.73rem;
  letter-spacing: 0.03em;
  margin-right: 3px;
}
.bagGroup small {
  color: var(--soft);
  font-size: 0.74rem;
}
.bagItem,
.emptySlot {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid #85734e;
  background: #151911;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0;
}
.bagItem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bagItem:hover {
  border-color: #fad79a;
}
.emptySlot {
  border: 1px dashed #74684f;
  background: radial-gradient(ellipse, #323126, #20231a);
}
.emptySlot:after {
  content: "";
  width: 9px;
  height: 13px;
  border: 1px solid #82755c;
  border-radius: 3px 3px 5px 5px;
  transform: rotate(8deg);
}
.packMap {
  margin-left: auto;
  padding: 4px 9px;
  background: transparent;
  color: #e9cb8f;
  font-size: 0.8rem;
  border: 1px solid #726343;
  min-height: 34px;
}
.itemDetail {
  display: flex;
  align-items: center;
  gap: 18px;
}
.itemPortrait {
  width: 105px;
  height: 105px;
  object-fit: cover;
  border: 1px solid #806844;
}
.itemDetail h2 {
  margin: 3px 0 8px;
}
.merchantScene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #262318;
  border: 1px solid #937746;
  height: clamp(215px, 24vw, 330px);
  padding: clamp(18px, 4vw, 55px);
}
.merchantScene .scenery {
  object-position: 58% 38%;
}
.merchantScene:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #121510db, #14170e60 44%, transparent 68%);
  z-index: -1;
}
.merchantScene h1 {
  font-size: clamp(2.5rem, 5.6vw, 5.2rem);
  color: #fff4d8;
  max-width: 9em;
}
.purse {
  color: #e1d0b2;
  font-size: 0.85rem;
  gap: 9px;
  margin-top: 12px;
}
.purse b,
.price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ffdb8a;
}
.goldMark {
  width: 13px;
  height: 13px;
  display: inline-block;
  border-radius: 50%;
  border: 2px solid #f2c76b;
  box-shadow: inset 0 0 0 1px #8f641e;
  background: #d6a341;
}
.shopHead {
  justify-content: space-between;
  margin: 21px 0 12px;
}
.shopHead h2,
.shopServices h2 {
  font-size: 1.65rem;
}
.wares,
.lootGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}
.ware {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #786548;
  background: linear-gradient(135deg, #302e23, #23251f);
}
.warePicture {
  height: clamp(95px, 10vw, 150px);
  background: radial-gradient(ellipse, #363527, #191e17);
  overflow: hidden;
  display: block;
  border-bottom: 1px solid #61543c;
}
.warePicture img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: contain;
}
.ware:has(img[src*="fighter-"]) .warePicture img,
.ware:has(img[src*="rogue-"]) .warePicture img,
.ware:has(img[src*="wizard-"]) .warePicture img,
.ware:has(img[src*="cleric-"]) .warePicture img {
  object-fit: cover;
}
.wareInfo,
.priceRow,
.lootActions {
  padding: 11px 14px;
}
.wareInfo .kicker {
  font-size: 0.6rem;
}
.ware h3 {
  font-size: 1.3rem;
  margin: 4px 0 5px;
  color: #f8edcf;
}
.wareInfo p:not(.kicker) {
  font-size: 0.84rem;
  color: #ddd8ca;
}
.priceRow {
  margin-top: auto;
  border-top: 1px solid #554d3c;
  justify-content: space-between;
  padding-block: 7px;
}
.purchase {
  min-height: 38px;
  background: #ddc080;
  color: #241e12;
  border: 1px solid #f1d496;
  padding: 5px 13px;
  border-radius: 2px;
  font-weight: 650;
}
.purchase:disabled,
.service:disabled {
  background: #33352b;
  color: #b7b6a6;
  border-color: #635f4e;
}
.price {
  font-weight: 650;
}
.ware.sold .warePicture {
  filter: saturate(0.35);
  opacity: 0.66;
}
.wareReason {
  color: #d0bea0;
  padding: 0 14px 8px;
  font-size: 0.74rem;
}
.shopServices {
  margin-top: 22px;
}
.shopServices > div {
  display: flex;
  gap: 10px;
  margin-top: 9px;
  flex-wrap: wrap;
}
.service {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid #685d43;
  background: #292b20;
  color: #f7ead0;
}
.service span {
  color: #d2cebd;
  font-size: 0.82rem;
}
.service small {
  color: #e8ca8b;
}
.service small .goldMark {
  vertical-align: -2px;
  margin-right: 4px;
}
.lootGrid {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 310px));
}
.lootCard .warePicture {
  height: 155px;
}
.lootActions {
  margin-top: auto;
  flex-wrap: wrap;
}
.lootActions button {
  font-size: 0.8rem;
}
.shopReceipt {
  margin-top: 8px;
  color: #f3d69a;
  min-height: 0;
}
.travelPending {
  cursor: progress;
}
.mapDialog {
  width: min(1020px, calc(100% - 24px));
}
@media (max-width: 767px) {
  .wares {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .wareInfo,
  .priceRow,
  .lootActions {
    padding: 8px;
  }
  .wareInfo p:not(.kicker) {
    font-size: 0.78rem;
  }
  .ware h3 {
    font-size: 1.1rem;
  }
  .packBar {
    gap: 5px 10px;
    padding: 5px 8px;
  }
  .merchantScene {
    height: 205px;
  }
  .merchantScene h1 {
    max-width: 5em;
  }
  .warePicture {
    height: 90px;
  }
  .bagItem,
  .emptySlot {
    width: 34px;
    height: 34px;
  }
  .bagGroup > b {
    font-size: 0.67rem;
  }
  .itemPortrait {
    width: 70px;
    height: 70px;
  }
  .itemDetail {
    gap: 9px;
  }
  .priceRow {
    flex-wrap: wrap;
    gap: 4px;
  }
  .price {
    font-size: 0.83rem;
  }
  .purchase {
    font-size: 0.75rem;
    min-height: 34px;
    padding: 4px 7px;
  }
  .packMap {
    font-size: 0.7rem;
  }
}

.merchantStatus {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  color: #fff3de;
}
.merchantStatus button {
  padding: 4px 11px;
  background: #1b1720;
  color: #f6e6d0;
}
.merchantStatus span {
  font-size: 0.88rem;
  text-shadow: 0 1px 4px #100a10;
}
