.shop { display: grid; gap: var(--gap); }

.shop__drawer {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; padding: 14px;
  background: #5b4330 var(--grain); border-radius: 4px;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, .55), inset 0 0 0 3px #46321f, 0 1px 0 rgba(255, 255, 255, .08);
}
.shop__cell {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 16px 12px 14px;
  background: #cdbb97 var(--grain); border-radius: 2px; box-shadow: inset 0 2px 6px rgba(60, 40, 20, .45), inset 0 0 0 1px rgba(60, 40, 20, .25);
}
.shop__cell h4 { font-family: var(--font-title); font-weight: 400; font-size: 18px; margin: 0; }
.shop__effect { margin: 0; font-family: var(--font-body); font-size: 14px; line-height: 1.4; }
.shop__rarity { font-family: var(--font-stamp); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.shop__price {
  position: absolute; top: 8px; right: 8px; font-size: 12px; background: #E9D9B0; padding: 3px 8px 3px 12px; border-radius: 2px;
  transform: rotate(4deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
}
.shop__buy { margin-top: auto; }
.shop__buy[aria-disabled='true'], .satchel__improve[aria-disabled='true'] { opacity: .45; cursor: not-allowed; filter: saturate(.5); }
.shop__empty { grid-column: 1 / -1; color: var(--paper); font-size: 26px; margin: 8px; }
.shop__intro { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; padding: 12px 18px 13px; border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35); position: relative; }
.shop__intro::before { content: ''; position: absolute; inset: 5px; border: 1px dashed var(--thread); border-radius: 2px; pointer-events: none; opacity: .8; }
.shop__intro h3 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: 22px; }
.shop__intro p { margin: 0; flex: 1 1 320px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); max-width: 78ch; }
.shop__what { display: grid; gap: 6px; justify-items: center; width: 100%; margin: 4px 0 6px; padding: 9px 10px 10px;
  background: rgba(255, 251, 242, .55); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(60, 40, 20, .12); }
.shop__max { margin: auto 0 0; font-size: 13px; color: var(--ink-soft); }
.itoken { display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }

.satchel { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--gap); align-items: start; }
.satchel__left { display: grid; gap: var(--gap); min-width: 0; }
.satchel__roll {
  position: relative; padding: 22px 18px 18px; border-radius: 4px 4px 14px 14px;
  background: #D9C9A3 var(--grain);
  background-image: var(--grain), repeating-linear-gradient(90deg, rgba(120, 95, 55, .10) 0 1px, transparent 1px 5px), repeating-linear-gradient(0deg, rgba(120, 95, 55, .08) 0 1px, transparent 1px 5px);
  box-shadow: inset 0 0 0 2px #bfa97c, 0 8px 16px rgba(0, 0, 0, .5);
}
.satchel__roll::before { content: ''; position: absolute; inset: 8px; border: 2px dashed var(--thread); border-radius: 3px; pointer-events: none; opacity: .85; }
.satchel__roll.shut { filter: saturate(.55) brightness(.9); }
.satchel__pockets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pocket { display: grid; gap: 4px; justify-items: center; }
.pocket {
  min-height: 112px; align-content: center; padding: 8px 4px; color: var(--ink);
  background: rgba(150, 120, 70, .18); border: 2px dashed var(--thread); border-radius: 3px 3px 18px 18px;
}
.pocket.filled { background: rgba(255, 250, 235, .35); border-style: solid; }
.pocket.drop, .satchel__tags.drop { background: rgba(46, 107, 95, .22); outline: 2px solid var(--verdigris); }
.pocket__item { display: grid; justify-items: center; cursor: grab; touch-action: none; border-radius: 50%; }
.pocket__item.on { outline: 3px solid var(--thread); outline-offset: 2px; }
.pocket__item:focus-visible, .tag:focus-visible { outline: 3px solid var(--verdigris); outline-offset: 2px; }
.tag, .pocket__item { user-select: none; -webkit-user-select: none; }
.tag { touch-action: none; }
.lifted { opacity: .35; }
body > .satchel__ghost { position: fixed; margin: 0; z-index: 1000; pointer-events: none; transform: translate(-50%, -50%) rotate(-4deg) scale(1.05);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .45)); }
.satchel__tags { min-height: 80px; border-radius: 4px; }
.satchel__head { display: flex; align-items: center; gap: 10px; }
.subject { display: grid; gap: 4px; }
.subject__row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; color: var(--ink-soft); }
.subject__pics { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.subject__pics canvas { box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.subject__pics .res__icon { width: 24px; height: 24px; }
.subject__shape { fill: var(--verdigris); }
.subject__row.less .subject__shape { fill: #a8907a; }
.pocket__empty { width: 36px; height: 36px; border-radius: 50%; border: 2px dotted rgba(42, 35, 32, .3); }
.pocket__name { font-size: 18px; line-height: 1; text-align: center; }
.satchel__hint { margin: 10px 0 0; text-align: center; font-size: 24px; }
.satchel__tags { display: flex; flex-wrap: wrap; gap: 14px; padding: 4px 2px; }
.tag {
  position: relative; display: grid; justify-items: center; gap: 2px; width: 118px; padding: 8px 6px 8px; cursor: pointer; color: var(--ink);
  background: var(--paper) var(--grain); border: 0; border-radius: 2px; box-shadow: var(--shadow-paper); transform: rotate(-1deg);
}
.tag:nth-child(even) { transform: rotate(1.2deg); }
.tag::before { content: ''; position: absolute; top: -7px; left: 50%; width: 1.5px; height: 10px; background: var(--thread); }
.tag.on { outline: 3px solid var(--thread); outline-offset: 2px; transform: none; }
.tag.worn { background-color: #E9D9B0; }
.tag__name { font-size: 18px; line-height: 1; text-align: center; }
.tag__lv { font-size: 10px; color: var(--ink-soft); text-align: center; }
.satchel__card { padding: 18px 20px; display: grid; gap: 8px; transform: rotate(.6deg); }
.satchel__card h3 { font-family: var(--font-title); font-weight: 400; font-size: 23px; margin: 0; }
.satchel__card p { margin: 0; }
.satchel__lv { font-size: 13px; color: var(--ink-soft); }
.satchel__eff { font-size: 22px; }
.satchel__eff.next { color: var(--verdigris-deep); }
.satchel__cost { font-size: 12px; }
.satchel__why { font-size: 20px; color: #8a3b2a; }
@media (max-width: 700px) {
  .shop__drawer { grid-template-columns: minmax(0, 1fr); }
  
  .satchel { grid-template-columns: minmax(0, 1fr); }
  .satchel__roll { padding: 16px 8px 12px; }
  .satchel__pockets { gap: 4px; }
  .pocket { min-height: 96px; padding: 6px 1px; }
  .pocket__name { font-size: 14px; }
  .tag { width: calc(50% - 8px); min-height: 48px; }
}
@media (max-width: 900px) { .hall__tabs { overflow-x: auto; max-width: 100%; } }
.satchel__improve { justify-self: start; }
@media (max-width: 700px) { .satchel__improve { justify-self: stretch; } }
.shop__price--chips { display: flex; gap: 6px; flex-wrap: wrap; }
.shop__cell .subject { justify-items: center; }
.shop__cell .subject__row { justify-content: center; }
.satchel__tags { border: 2px dashed rgba(216, 160, 58, .35); padding: 10px; }
.satchel__empty { margin: auto; color: var(--paper); opacity: .7; font-size: 20px; }
