.bl-card {
  --bl-line: var(--border, #34403a);
  --bl-muted: var(--dim, #abb6a9);
  --bl-accent: var(--accent, #d7ea99);
  min-width: 0;
}
.bl-card h2.bl-heading { display: block; margin: 0; }
.bl-toggle, .bl-slot, .bl-use, .bl-add, .bl-remove, .bl-soft, .bl-confirm-yes {
  font-family: inherit;
  touch-action: manipulation;
}
.bl-toggle {
  width: 100%; min-height: 34px; display: flex; align-items: center; gap: 9px;
  padding: 1px 0; text-align: left; background: transparent; border: 0; color: inherit;
}
.bl-icon { display: inline-flex; flex: none; color: var(--bl-accent); }
.bl-card .bl-icon svg { display: block; width: 18px; height: 18px; }
.bl-toggle .bl-icon:last-child { color: var(--bl-muted); }
.bl-toggle .bl-icon:last-child svg { width: 14px; height: 14px; transition: transform .15s; }
.bl-toggle[aria-expanded="true"] .bl-icon:last-child svg { transform: rotate(180deg); }
.bl-heading-name { flex: 1; min-width: 0; font: inherit; font-weight: 700; }
.bl-count {
  flex: none; font: 500 .74rem var(--mono,monospace); color: var(--bl-muted);
  white-space: nowrap; letter-spacing: -.02em;
}
.bl-body { margin-top: 12px; display: grid; gap: 10px; }
.bl-group { min-width: 0; }
.bl-group + .bl-group { padding-top: 8px; border-top: 1px solid var(--bl-line); }
.bl-group-bar { display: flex; gap: 6px; align-items: center; margin-bottom: 5px; }
.bl-group-name { flex: 1; min-width: 0; font-size: .84rem; font-weight: 650; color: var(--bl-muted); }
.bl-use, .bl-remove, .bl-soft, .bl-confirm-yes {
  min-height: 31px; background: transparent; border: 0; border-radius: 4px;
  padding: 3px 6px; color: var(--bl-muted); font-size: .76rem;
}
.bl-use { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--bl-line); }
.bl-use[aria-pressed="true"] { color: var(--bl-accent); border-color: #697e52; background: #283524; }
.bl-use[aria-pressed="true"]::before { content: '✓'; }
.bl-remove { display: grid; place-items: center; width: 30px; }
.bl-remove .bl-icon { color: inherit; }
.bl-remove .bl-icon svg { width: 14px; height: 14px; }
.bl-slots { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.bl-slot {
  position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; width: 100%; min-width: 0; padding: 3px 2px 5px;
  overflow: hidden; border: 1px solid #465742; border-radius: 6px;
  background: linear-gradient(150deg,#354736,#19241e); color: #d3debf;
}
.bl-slot.bl-empty { background: #17221d; border: 1px dashed #52634f; }
.bl-slot:hover, .bl-slot:focus-visible { background: #2e3d2e; border-color: var(--bl-accent); }
.bl-slot img, .bl-plus, .bl-fallback {
  display: grid; place-items: center; width: min(100%,56px); aspect-ratio: 1; object-fit: contain;
}
.bl-plus { font: 400 1.68rem/1 system-ui,sans-serif; color: #b6c7a9; }
.bl-fallback { font-size: .68rem; overflow-wrap: anywhere; }
.bl-slot-number { display: block; margin-top: 1px; font: 600 .69rem/1.15 var(--mono,monospace); }
.bl-ban-card .bl-slot-number { color: #c4aa95; }
.bl-add {
  width: 100%; min-height: 34px; padding: 4px 7px; font-size: .83rem; font-weight: 600;
  color: var(--bl-accent); background: #202c24; border: 1px solid #41543b; border-radius: 5px;
}
.bl-add:hover, .bl-use:hover, .bl-remove:hover, .bl-soft:hover { background: #2f3b30; }
.bl-ban-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; }
.bl-ban-actions .bl-add { flex: 1 1 5.5rem; }
.bl-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.bl-confirm-yes { color: #f9cebc; border: 1px solid #835e4b; background: #392a24; }
@media (min-width:600px) and (max-width:850px) and (min-height:541px) {
  .bl-slots { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .bl-slot { flex-direction: row; justify-content: center; gap: 10px; min-height: 48px; }
  .bl-slot img, .bl-plus { width: 48px; }
}
@media (pointer:coarse) {
  .bl-toggle, .bl-add, .bl-slot, .bl-use, .bl-soft, .bl-remove, .bl-confirm-yes { min-height: 44px; }
  .bl-use, .bl-remove { min-width: 44px; }
}
@media (min-width:851px) and (min-height:650px) {
  .map-panel { position: sticky; top: 12px; }
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:540px) and (max-width:1024px) {
  .workspace { grid-template-columns: minmax(0,1fr) clamp(208px,28vw,254px); }
}
@media (orientation:landscape) and (max-height:540px) and (max-width:1024px) {
  .bl-toggle { gap: 4px; }.bl-count { font-size: .65rem; }
  .bl-card .bl-heading { font-size: .85rem; }.bl-toggle > .bl-icon:first-child svg { width: 14px; height: 14px; }
  .bl-body { margin-top: 4px; gap: 6px; }.bl-slots { gap: 3px; }
  .bl-slot img, .bl-plus { width: min(100%,42px); }
  .bl-add, .bl-soft { font-size: .75rem; }.bl-ban-actions { gap: 2px; }
}
@media (prefers-reduced-motion:reduce) {
  .bl-toggle .bl-icon:last-child svg { transition: none; }
}
