.grid {
  --thumb-height: 140px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.item {
  position: relative;
  height: var(--thumb-height);
  width: fit-content;
  max-width: 100%;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item img {
  height: var(--thumb-height);
  width: auto;
  display: block;
  object-fit: contain;
}

.removeBtn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  color: white;
  transition: background 0.2s;
}

.removeBtn:hover {
  background: #ef4444;
}

.addBtn {
  height: var(--thumb-height);
  width: var(--thumb-height);
  flex: 0 0 var(--thumb-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed rgba(148, 163, 184, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.4);
  color: var(--text-secondary);
  font-size: 12px;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.addBtn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb) / 0.04);
}

.wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
}
