.cat-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.cat-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background-color: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
}

.cat-row.is-dragging {
  opacity: 0.5;
}

.cat-row__handle {
  display: inline-flex;
  color: var(--c-muted);
  cursor: grab;
}

.cat-row__handle .icon {
  width: 18px;
  height: 18px;
}

.cat-row__names {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.cat-row__name {
  font-weight: var(--fw-semibold);
}

.cat-row__template {
  width: 220px;
  max-width: 45%;
}

@media (max-width: 48rem) {
  .cat-row {
    flex-wrap: wrap;
  }

  .cat-row__template {
    width: 100%;
    max-width: none;
  }
}

.display-preview {
  margin-top: var(--sp-2);
}

.pl-editor {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.pl-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 460px;
  min-height: 280px;
  margin-inline: auto;
  padding: var(--sp-5);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  touch-action: none;
  user-select: none;
}

.pl-stage--shelf {
  background-color: #f3ece1;
}

.pl-stage--wall {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(42, 26, 26, 0.05)),
    repeating-linear-gradient(
      0deg,
      rgba(125, 10, 10, 0.04) 0 2px,
      transparent 2px 6px
    ),
    #f6eccf;
  box-shadow: inset 0 0 40px rgba(42, 26, 26, 0.08);
}

.pl-card {
  width: 175px;
}

.pl-card__stand {
  position: relative;
  width: 100%;
  height: 150px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
  cursor: grab;
}

.pl-card__stand::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  background:
    linear-gradient(
      100deg,
      rgba(255, 244, 222, 0.28),
      rgba(255, 244, 222, 0) 40%,
      rgba(40, 24, 12, 0.32)
    ),
    repeating-linear-gradient(
      0deg,
      rgba(50, 30, 15, 0) 0 2px,
      rgba(50, 30, 15, 0.14) 2px 3px,
      rgba(50, 30, 15, 0) 3px 8px
    ),
    linear-gradient(180deg, #9a6c42 0%, #6e4627 55%, #4a3119 100%);
  border-radius: 6px;
  box-shadow: 0 14px 18px rgba(42, 26, 26, 0.3);
  z-index: 1;
}

.pl-card__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3);
  overflow: hidden;
  background-color: var(--c-surface);
  border: 12px solid #7a5a34;
  border-radius: 3px;
  box-shadow:
    inset 0 0 0 3px #d8c49a,
    6px 8px 14px rgba(42, 26, 26, 0.3);
  cursor: grab;
}

.pl-art {
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.pl-card__stand .pl-art {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 6px rgba(42, 26, 26, 0.22));
}

.pl-card__frame .pl-art {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pl-stage--hanging {
  background-color: #f3ece1;
}

.pl-card__hang {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 48px;
  cursor: grab;
}

.pl-card__hang::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 52px;
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 60'><path d='M24 17C21-1 2 3 4 18c1.6 10 20 22 20 22s18.4-12 20-22C46 3 27-1 24 17z' fill='%23BF3131' stroke='%237d0a0a' stroke-width='1.5'/><rect x='22.5' y='38' width='3' height='14' rx='1.5' fill='%238a5a2b'/></svg>")
    center / contain no-repeat;
}

.pl-card__hang .pl-art {
  max-width: 100%;
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(3px 7px 9px rgba(42, 26, 26, 0.22));
}

.pl-controls {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-4);
  flex-wrap: wrap;
  justify-content: center;
}

.pl-controls__item {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.pl-range {
  width: 170px;
  accent-color: var(--c-red);
}
