.bch-open {
  overflow: hidden;
}

.bch {
  position: fixed;
  inset: 0;
  z-index: 7620;
  display: grid;
  place-items: stretch;
  font: 500 13px/1.45 "Figtree", "Segoe UI", system-ui, sans-serif;
  color: #e8eef6;
}

.bch[hidden] {
  display: none !important;
}

.bch__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.62);
}

.bch__panel {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100vw - 32px));
  max-height: min(82vh, 720px);
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 14px;
  border-radius: 16px;
  background: linear-gradient(165deg, #1c2433 0%, #121821 100%);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.bch__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bch__kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.bch__title {
  margin: 2px 0 4px;
  font: 800 22px/1.15 "Syne", "Figtree", system-ui, sans-serif;
}

.bch__stock {
  margin: 0;
  color: #cbd5e1;
}

.bch__close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.16);
  color: #f8fafc;
  font-size: 22px;
  cursor: pointer;
}

.bch__tabs {
  display: flex;
  gap: 8px;
}

.bch__tab {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  cursor: pointer;
  font: inherit;
}

.bch__tab.is-active {
  background: #f59e0b;
  color: #111827;
  font-weight: 700;
}

.bch__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
  overflow: auto;
  padding-right: 4px;
}

.bch__card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  text-align: left;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.55);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.bch__preview {
  display: grid;
  place-items: center;
  width: 100%;
  height: 120px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.bch__preview.is-empty::after {
  content: "?";
  color: #64748b;
  font: 700 28px/1 "Syne", system-ui, sans-serif;
}

.bch__preview-canvas {
  max-width: calc(100% - 8px);
  max-height: calc(100% - 8px);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.bch__card:hover:not(:disabled) {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(30, 41, 59, 0.85);
}

.bch__card.is-locked,
.bch__card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bch__card-name {
  font-weight: 700;
  text-transform: capitalize;
}

.bch__card-meta {
  font-size: 12px;
  color: #94a3b8;
}

.bch__card-cost {
  font-size: 12px;
  color: #fde68a;
}
