.thumb-slot {
  position: relative;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
}
.thumb-slot__inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-slot__inner img,
.thumb-slot__inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-slot__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(11 / 17 * 1rem);
  color: var(--muted);
  padding: 6px;
  text-align: center;
}
.thumb-slot__del {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  font-size: calc(20 / 17 * 1rem);
  line-height: 0;
  font-weight: 800;
  border-radius: 7px;
  border: 1px solid rgba(239, 68, 68, 0.92);
  background: rgba(239, 68, 68, 0.72);
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.65),
    0 0 2px rgba(0, 0, 0, 0.65);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.18);
  display: none;
}
.thumb-slot.has-media .thumb-slot__del {
  display: flex;
}
.thumb-slot__del:hover {
  border-color: rgba(239, 68, 68, 1);
  background: rgba(239, 68, 68, 0.82);
}
.thumb-slot__download {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 3;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.72);
  color: #f4f4f5;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  line-height: 0;
}
.thumb-slot.has-media .thumb-slot__download {
  display: flex;
}
.thumb-slot__crop {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.72);
  color: #f4f4f5;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  line-height: 0;
  display: none;
}
.thumb-slot.has-media .thumb-slot__crop {
  display: flex;
}
.thumb-slot__crop:hover {
  background: rgba(124, 58, 237, 0.45);
  border-color: rgba(124, 58, 237, 0.6);
  color: #fff;
}
.thumb-slot__crop svg {
  display: block;
  pointer-events: none;
  transform: scale(0.92);
  transform-origin: center;
}
.thumb-slot__download:hover {
  background: rgba(124, 58, 237, 0.45);
  border-color: rgba(124, 58, 237, 0.6);
  color: #fff;
}
.thumb-slot__download svg {
  display: block;
  pointer-events: none;
  transform: scale(0.92);
  transform-origin: center;
}
.imgpreview {
  width: 200px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #000;
  display: block;
  margin-top: 6px;
}

.thumbgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 900px) {
  .thumbgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
