body {
  margin: 0;
}

.bp-local-nav-wrap {
  position: sticky;
  top: var(--app-topbar-height);
  z-index: 1020;
}

.bp-local-nav {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.bp-local-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 850;
  text-decoration: none;
  color: inherit;
  padding: .25rem .25rem;
  border-radius: 12px;
  white-space: nowrap;
}

.bp-local-nav .nav {
  gap: .35rem;
}

.bp-local-nav .nav-link,
.bp-local-nav .dropdown-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.bp-local-nav .nav-link {
  color: var(--bs-secondary-color);
  border-radius: 999px;
  padding: .35rem .70rem;
}

.bp-local-nav .nav-link:hover {
  color: var(--bs-body-color);
  background: rgba(var(--bs-primary-rgb), 0.08);
}

.bp-local-nav .nav-link.active {
  color: #fff;
}

.bp-local-nav .dropdown-item.active,
.bp-local-nav .dropdown-item:active {
  background: var(--bs-primary);
  color: #fff;
}

.bp-stage-shell {
  border: 1px dashed rgba(0, 0, 0, 0.12);
  border-radius: 1rem;
  background:
    linear-gradient(45deg, rgba(0,0,0,.03) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.03) 75%),
    linear-gradient(45deg, rgba(0,0,0,.03) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.03) 75%),
    #f8f9fa;
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: .75rem;
}

#editorCanvas {
  display: block;
  width: min(100%, 760px);
  aspect-ratio: 1 / 1;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.08);
  touch-action: none;
  cursor: grab;
}

#editorCanvas.dragging {
  cursor: grabbing;
}

.bp-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: .75rem;
}

.bp-filter-card {
  appearance: none;
  border: 1px solid var(--bs-border-color);
  border-radius: .9rem;
  background: var(--bs-body-bg);
  padding: .65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  text-align: center;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.bp-filter-card:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--bs-primary-rgb), .4);
}

.bp-filter-card.is-active {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .15);
}

.bp-filter-thumb-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: .75rem;
  background:
    linear-gradient(45deg, rgba(0,0,0,.03) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.03) 75%),
    linear-gradient(45deg, rgba(0,0,0,.03) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.03) 75%),
    #f8f9fa;
  background-size: 18px 18px;
  background-position: 0 0, 9px 9px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
}

.bp-filter-thumb {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.x-small {
  font-size: .72rem;
}

.bp-history-card {
  min-height: 100%;
}

.bp-history-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.bp-history-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: .75rem;
  align-items: start;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  padding: .75rem;
  background: var(--bs-body-bg);
}

.bp-history-thumb {
  width: 88px;
  aspect-ratio: 1 / 1;
  border-radius: .8rem;
  overflow: hidden;
  background: #f8f9fa;
  border: 1px solid rgba(0,0,0,.06);
}

.bp-history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bp-history-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  margin-bottom: .35rem;
}

.bp-history-title {
  margin: 0;
  font-size: 1rem;
}

.bp-history-meta {
  margin: 0;
  color: var(--bs-secondary-color);
  font-size: .88rem;
  line-height: 1.45;
}

.bp-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .65rem;
}

.bp-history-actions .btn,
.bp-history-actions a {
  --bs-btn-padding-y: .25rem;
  --bs-btn-padding-x: .55rem;
  --bs-btn-font-size: .82rem;
}

.bp-admin-filter-card img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

@media (min-width: 1200px) {
  .bp-history-card {
    position: sticky;
    top: calc(var(--app-topbar-height) + 1rem);
  }
}

@media (max-width: 575.98px) {
  .bp-history-item {
    grid-template-columns: 1fr;
  }

  .bp-history-thumb {
    width: 100%;
  }

  .bp-stage-shell {
    min-height: 300px;
  }
}
